Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

big5 unicode conversion

3 posts in General Discussion (Chinese) Last posting was on 2007-06-13 08:51:29.0Z
Michael Posted on 2007-03-14 07:54:13.0Z
Sender: 19a4.45f7a96f.1804289383@sybase.com
From: michael
Newsgroups: sybase.public.chinese.powerbuilder.general
Subject: big5 unicode conversion
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <45f7aa25.19bb.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 13 Mar 2007 23:54:13 -0800
X-Trace: forums-1-dub 1173858853 10.22.241.41 (13 Mar 2007 23:54:13 -0800)
X-Original-Trace: 13 Mar 2007 23:54:13 -0800, 10.22.241.41
Lines: 2
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.chinese.powerbuilder.general:203
Article PK: 104232

how can I convert big5 to unicode with PB 10 and vice versa?


<Jonathan Chan> Posted on 2007-06-05 05:48:08.0Z
From: <Jonathan Chan>
Newsgroups: sybase.public.chinese.powerbuilder.general
References: <45f7aa25.19bb.1681692777@sybase.com>
Subject: Re: big5 unicode conversion
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
NNTP-Posting-Host: pcd644198.netvigator.com
X-Original-NNTP-Posting-Host: pcd644198.netvigator.com
Message-ID: <4664f918@forums-1-dub>
Date: 4 Jun 2007 22:48:08 -0700
X-Trace: forums-1-dub 1181022488 218.102.176.198 (4 Jun 2007 22:48:08 -0700)
X-Original-Trace: 4 Jun 2007 22:48:08 -0700, pcd644198.netvigator.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.chinese.powerbuilder.general:244
Article PK: 104272

Such conversation denpends pretty much on the OS, so it relies on what
character set the OS is taking as the default non-Unicode character set (PB
calls it ANSI). Therefore, we have to make BIG5 to be such character set in
your environment. Pls. see if the following helps...

1. Pls. check whether the environment variable PB_DEFAULT_LOCALE is set in
your environment. It should be "SYSTEM" or "USER". (It defaults to "SYSTEM"
if it is not set)

2. Depending whether PowerBuilder is looking at the SYSTEM locale or the
USER locale, make sure your windows environment is set up to use one of the
following locales (e.g. for XP, Start->Control panel->Regional and Language
Options. For USER Locale, look into the Regional Options->Standards and
Formats. For SYSTEM Locale, check Advanced->Language for non-unicode
programs. Changing SYSTEM locale normally requires restarting Windows):

- Chinese (Hong Kong)
- Chinese (Macau)
- Chinese (Taiwan)

3. In PowerBuilder, write scripts similiar to the following:

Blob Blb_big5
Blb_big5 = Blob("Any Text", EncodingANSI!)

Then blb_big5 will be holding the BIG5 bytes.

Or if you're writing a file in Big5, simply speicify the "ANSI" mode when
opening the file:

li_ret = FileOpen(ls_file, TextMode!, Write!, LockReadWrite!, Replace!,
EncodingANSI!)

Hope these help.

Rgds,
Jonathan

<michael> wrote in message news:45f7aa25.19bb.1681692777@sybase.com...
> how can I convert big5 to unicode with PB 10 and vice versa?


<Jonathan Chan> Posted on 2007-06-13 08:51:29.0Z
From: <Jonathan Chan>
Newsgroups: sybase.public.chinese.powerbuilder.general
References: <45f7aa25.19bb.1681692777@sybase.com> <4664f918@forums-1-dub>
Subject: Re: big5 unicode conversion
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
x-mimeole: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: pcd303210.netvigator.com
X-Original-NNTP-Posting-Host: pcd303210.netvigator.com
Message-ID: <466fb011$1@forums-1-dub>
Date: 13 Jun 2007 01:51:29 -0700
X-Trace: forums-1-dub 1181724689 203.218.93.210 (13 Jun 2007 01:51:29 -0700)
X-Original-Trace: 13 Jun 2007 01:51:29 -0700, pcd303210.netvigator.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.chinese.powerbuilder.general:246
Article PK: 104273

Sorry, just realized a mistake I made in my previous post.

PB_DEFAULT_LOCALE defaults to "USER" (instead of "SYSTEM")

<Jonathan Chan> wrote in message news:4664f918@forums-1-dub...
> Such conversation denpends pretty much on the OS, so it relies on what
> character set the OS is taking as the default non-Unicode character set
> (PB calls it ANSI). Therefore, we have to make BIG5 to be such character
> set in your environment. Pls. see if the following helps...
>
> 1. Pls. check whether the environment variable PB_DEFAULT_LOCALE is set in
> your environment. It should be "SYSTEM" or "USER". (It defaults to
> "SYSTEM" if it is not set)
>
> 2. Depending whether PowerBuilder is looking at the SYSTEM locale or the
> USER locale, make sure your windows environment is set up to use one of
> the following locales (e.g. for XP, Start->Control panel->Regional and
> Language Options. For USER Locale, look into the Regional
> Options->Standards and Formats. For SYSTEM Locale, check
> Advanced->Language for non-unicode programs. Changing SYSTEM locale
> normally requires restarting Windows):
>
> - Chinese (Hong Kong)
> - Chinese (Macau)
> - Chinese (Taiwan)
>
> 3. In PowerBuilder, write scripts similiar to the following:
>
> Blob Blb_big5
> Blb_big5 = Blob("Any Text", EncodingANSI!)
>
> Then blb_big5 will be holding the BIG5 bytes.
>
> Or if you're writing a file in Big5, simply speicify the "ANSI" mode when
> opening the file:
>
> li_ret = FileOpen(ls_file, TextMode!, Write!, LockReadWrite!, Replace!,
> EncodingANSI!)
>
> Hope these help.
>
> Rgds,
> Jonathan
> <michael> wrote in message news:45f7aa25.19bb.1681692777@sybase.com...
>> how can I convert big5 to unicode with PB 10 and vice versa?
>
>