on 1/8/04 9:56 AM, REALbasic Network Users Group at
realbasic-nug at lists dot realsoftware dot com wrote:
> Subject: Re: How to find and replace Shift-JIS characters
> From: "Joseph J. Strout" <joe at realsoftware dot com>
> Date: Thu, 8 Jan 2004 08:52:37 -0600
>
> At 1:08 AM -0800 1/8/04, Jeffrey Ellis wrote:
>
>> We have found that in Shift-JIS (which is what I've been told is the system
>> RB 4.5 uses for Japanese when compiling), the "\" character is displayed as
>> "¥" instead. We know that there are other "\" 's which can be used ( a bunch
>> of them in fact), but we haven't got the vaguest idea how to do a find and
>> replace of one shift-jis (or for that matter, even one Unicode character)
>> with another.
>>
>> I would like to use Unicode 2572 to replace the Unicode 005c character.
Hi, Joe--
> It seems to me there are a lot of assumptions here that don't fit
> together. If you were using Unicode, then this problem probably
> wouldn't occur. If you're not using Unicode, then of course you
> can't replace one Unicode character with another.
> If you see a Yen symbol where you expect a backslash, it's probably
> because the your text is indeed in Shift-JIS, and the backslash and
> Yen symbol occupy the same code point, displayed differently
> depending on which font you use. If that is the case, then there's
> little you can do about it except switch to a different encoding, or
> switch to a different font.
We have our app built from the start in English/U.S. We have all our
displayed strings set as Constants, with Japanese characters being among the
languages we use. We then build the Japanese version using Japan as the
Region and Japanese as the language. So if there is an encoding problem I'm
not sure how else we would handle it.
>
> Probably the easiest solution is to upgrade to 5.x, where strings are
> compiled as UTF-8, and (at least on OS X) this problem will not occur.
As said, we cannot use 5.x for this project as yet, although we will be
moving to 5.x for our next release.
In any case, it seems that I'm asking a fairly simple question as to the
procedure to replace one Unicode character with another.
All My Best,
Jeffrey
- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|