Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

printw.c - for Unicode? #160

Closed
waltje opened this issue Dec 12, 2023 · 3 comments
Closed

printw.c - for Unicode? #160

waltje opened this issue Dec 12, 2023 · 3 comments

Comments

@waltje
Copy link

waltje commented Dec 12, 2023

Hi:

Is it me, or are there no 'w' variants for the printw() series of functions?

I have a Unicode (wide-char) mode application that wants to write wchar_t strings to the screen, using vw[_]printw, but that of course won't work; the strings will eventually be sent to the regular, narrow-character functions (waddch et al.)

Shouldn't there be a wprintw.c module that handles these?

Just checking before I dive in too deep...

@wmcbrine
Copy link
Owner

wmcbrine commented Dec 12, 2023

Interesting. Well, it wouldn't be wprintw() -- that already exists, but it means window-printw() -- but I get what you mean. It seems this is a gap in the X/Open Curses standard.

You could use swprintf() to format the string to a buffer, and then addwstr() to render that to curses.

@waltje
Copy link
Author

waltje commented Dec 12, 2023 via email

@wmcbrine
Copy link
Owner

Eh, thanks, but I prefer not to extend PDCurses in this way. Unless you got X/Open to adopt it...

@waltje waltje closed this as completed Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants