On Jan 30, 2006, at 6:25 PM, Adam Ernst wrote:
On Jan 30, 2006, at 7:51 PM, Michael Diehr wrote:
On Jan 30, 2006, at 5:22 PM, Adam Ernst wrote:
On Jan 30, 2006, at 7:17 PM, Michael Diehr wrote:
Encodings are confusing. My RB 4.5.3 app includes some
copyright strings, such as (c) 2005 (where the (c) is the
copyright symbol). I find that if I'm running this app under
Windows XP, and the user has selected Chinese-PRC as the
"Language for non unicode programs", then text fields which
display this text no longer look right, i.e.
Copyright ©2005
comes out as
Copyright ?005
Upgrade to RB 2006, which uses all-Unicode strings. (Of course,
try the demo first to make sure it works; but it should.)
Adam
You guys with your "upgrade to RB X" comments. Grr. :) I'm
trying to do a small maintenance / bugfix release of a product
currently in 4.5.3, and just wanted to do some quick
cleanups. RB2006 will come later, rest assured.
Well, of course.
But today, I'm stuck in 4.5.3. So, to repeat the question, is
there a quick & dirty way to hack this so that text looks right
under double-byte char systems in a RB 4.5.3 app?
No. It's not a bug, and as far as I know, there's nothing you can
do to prevent it.
You see, the strings in your application are just bytes. Windows
doesn't know how to interpret them. It assumes they're ISO-8859-1,
the Windows standard Western encoding. If your user changes that so
that it assumes it's in Chinese, it treats it as Chinese. Don't
blame Windows; you told it to do that. (This recalls to the bad old
days when each language version of a program had a separate
executable.)
So short of upgrading to RB 2006 so that it's a Unicode app,
there's nothing you can do. Except stop setting the default
language setting to Chinese.
Adam
Thanks for that explanation. The strange thing to me is that my app
works at all under Chinese settings. In fact, it works nearly
perfectly.
The only exceptions are cases where I'm trying to display high-ascii
text (which is mainly cosmetic, and I can ignore) and then in a few
places where I do string comparisons on strings that have high-ascii
text (which causes the app to fail).
My gut feeling here is that with hack or two, I ought to get it back
to working fully.
Perhaps the problem comes when i read a text file from disk, and then
do string comparisons on it? Maybe if I just force the string data
to a known encoding first?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|