realbasic-nug
[Top] [All Lists]

Re: RB 4.5 Encodings Help?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: RB 4.5 Encodings Help?
From: Adam Ernst <adam1234 at athenet dot net>
Date: Mon, 30 Jan 2006 21:08:59 -0600
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <8280DB2A-1AB9-40DB-985D-2838529B2560 at xochi dot com> <2B1BBA26-74F1-4EFA-B652-AD71FE3AA6B0 at athenet dot net> <4A36ED12-557F-4206-BD6C-623063CB80A2 at xochi dot com> <93061452-41E6-422E-AB19-45C2E5EF03FB at athenet dot net> <67EF1C6B-96B0-4243-AEB7-8F13B1FE626E at xochi dot com>
On Jan 30, 2006, at 8:45 PM, Michael Diehr wrote:

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).

Of course. Standard Western encodings and Chinese encodings are the same for ASCII values < 127; it's only when you go above ASCII 127 that things diverge. I take it you've never learned about the technical details of encodings--do so, it's valuable knowledge.

My gut feeling here is that with hack or two, I ought to get it back to working fully.

Doubt it. You could try some DefineEncoding hacks here and there, but that would get ugly.

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?

Right. Try DefineEncoding(s, Encodings.WindowsLatin1).

Adam

_______________________________________________
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>


<Prev in Thread] Current Thread [Next in Thread>