S
Stephan Rose
Question everyone,
I may be slightly off-topic with this but I'm not really sure where else
to go with this.
what's the "best/easiest" ways to deal with string encodings?
Right now, I'm using wstring for all my string operations outside the GUI
and this works really well. Also using it for file io.
Problem is this though: It's defined as wchar_t which inherently isn't a
problem, except that wchar_t is 32-bit under linux and 16-bit under
windows.
That difference right there is going to break my file IO code as I target
both platforms.
utf-8 is another option but I don't terribly like it much due to the fact
that each character can have a different width in bytes.
That is one of the things I like the most about 32-bit wchar_t. No matter
what, each character will always be *one* wchar_t. Makes indexing into a
string simple and painless.
But still, with one platform/compiler (not sure on which level the
difference is) having wchar_t 32-bit and the other 16-bit, this is slowly
turning into a nightmare.
Any suggestions would be very appreciated,
Thanks in advance.
--
Stephan
2003 Yamaha R6
å›ã®äº‹æ€ã„å‡ºã™æ—¥ãªã‚“ã¦ãªã„ã®ã¯
å›ã®äº‹å¿˜ã‚ŒãŸã¨ããŒãªã„ã‹ã‚‰
I may be slightly off-topic with this but I'm not really sure where else
to go with this.
what's the "best/easiest" ways to deal with string encodings?
Right now, I'm using wstring for all my string operations outside the GUI
and this works really well. Also using it for file io.
Problem is this though: It's defined as wchar_t which inherently isn't a
problem, except that wchar_t is 32-bit under linux and 16-bit under
windows.
That difference right there is going to break my file IO code as I target
both platforms.
utf-8 is another option but I don't terribly like it much due to the fact
that each character can have a different width in bytes.
That is one of the things I like the most about 32-bit wchar_t. No matter
what, each character will always be *one* wchar_t. Makes indexing into a
string simple and painless.
But still, with one platform/compiler (not sure on which level the
difference is) having wchar_t 32-bit and the other 16-bit, this is slowly
turning into a nightmare.
Any suggestions would be very appreciated,
Thanks in advance.
--
Stephan
2003 Yamaha R6
å›ã®äº‹æ€ã„å‡ºã™æ—¥ãªã‚“ã¦ãªã„ã®ã¯
å›ã®äº‹å¿˜ã‚ŒãŸã¨ããŒãªã„ã‹ã‚‰