realbasic-nug
[Top] [All Lists]

Re: Japanese Text Encoding and nthField

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Japanese Text Encoding and nthField
From: Will Leshner <leshner at ljug dot com>
Date: Wed, 29 Sep 2004 20:23:40 -0700
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <20040929193652247796 dot GyazMail dot garykob at earthlink dot net> <D6DFB608-128C-11D9-AF48-000A95983FBE at ljug dot com> <F2417739-128E-11D9-9EEB-000A95983FBE at ljug dot com>
Ok. I've just about convinced myself there is something wrong with NthField when it operates on ShiftJIS, as you have suggested. If I do this:

s = "顔" + Chr(9) + "AB"

I should end up with a UTF8 string with a tab in it, and in fact if I use NthField on that it works fine. But if I convert that to ShiftJIS:

s = ConvertEncoding(s, Encodings.ShiftJIS)

Then NthField doesn't work anymore. In fact, you don't even need to use tab. A comma doesn't work either. So it would seem that NthField is getting confused by ShiftJIS. The solution, I would think, would be to convert everything to UTF8 before using NthField.

I just tried Split and it seems to suffer from the same problem.

--
REALbasic database options: http://sqlabs.net
REALbasic news and tips: http://rbgazette.com
KidzMail & KidzLog: http://haranbanjo.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

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