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: Michael Diehr <md03 at xochi dot com>
Date: Tue, 31 Jan 2006 13:32:31 -0800
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>
Update:

1. Display: Strings entered using the forsaken high-ascii characters (like the copyright symbol) don't display properly in edit fields and static texts when the XP box is set to use Chinese-PRC for the "Language for non unicode programs". I have not found any way to solve this problem. I'm thinking I need to convince the edit field or static text to not use a double-byte character set. A workaround would just be to use ASCII chars only, but seems like I ought to be able to use text encoding conversion some how. The details elude me however.

2. Logical: String operations were failing whenever a string had high- ascii characters. I've solved this problem. The trick was to simply use binary versions of all string operators in any case where the strings in question might have high-ascii characters. So, instead of using Instr, Mid, Len, use InstrB, MidB, LenB. I had to write my own custom CountFieldsB and NthFieldB functions as these don't exist in RB 4.5.3 Also, I have a lot of "select case" statements with string constants, but I've found that these still work properly as long as neither string has high ascii characters. Since I'm mainly using this for text file parsing, looking for known tokens that I define in a text file that my program wrote, this is not an issue. Overall I'd consider this second issue to be solved.


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