🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8206

Unicode Conversion - Help

#8206
From: Harry Whitehouse
Date: Thu, 12 Apr 2001 00:01
27 lines
1873 bytes
I have a legacy HTTP application which is sending my JAVA application data
in a simple binary stream of 8 bit bytes.  I'm capturing this data in an
integer array (I've tried char array as well)  and I'm getting into problems
with the Unicode representation.

Here's an example.  Part of the binary stream represents a long int 50301.
It's being transmitted to me as four bytes --  x00 x07 xA2 x89.

In the char array which capture this I what I see:

               \u2030
               \u00A2
               \u0007
               \u0000

I've written my own crude routine to convert this.  Of course it fails in
handling the \u2030 character because it loses precision when I cast it to a
byte.  Can anyone suggest a way to handle this problem?  Is there a function
will will properly convert the \u2030 to \x89?  BTW, I have a similar
problem trying to SEND a byte \x80 or \x81 to a legacy HTTP server
application.

Any help will be GREATLY appreciated!

TIA

Hary
Technical Details
Message-ID: <3ad4f06c$2_2@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!sn-xit-01!supernews.com!newspeer2.tds.net!nntp.twtelecom.net!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,eba31f969c5fae3c,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-04-11 17:24:19 PST
From: "Harry Whitehouse" <harry@envmgr.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: Unicode Conversion - Help
Date: Wed, 11 Apr 2001 17:01:48 -0700
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 38.168.115.135
Message-ID: <3ad4f06c$2_2@dnews>
X-Trace: dnews 987033708 38.168.115.135 (11 Apr 2001 17:01:48 -0700)
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!sn-xit-01!supernews.com!newspeer2.tds.net!nntp.twtelecom.net!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews