🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Bad URL(), Bad Encoder, Bad...

#7978
From: Harry Whitehouse
Date: Sat, 05 May 2001 01:26
34 lines
2272 bytes
I'm doing a simple GET to a server, and the data portion of the get string
contains some \u0081 and \u0080 characters used for control.

Somewhere in the URL MyURL = new URL(".. get operation");          the Java
runtime is converting these characters to x3F.  This is some sort of
encoding conversion, because the range of values between x80 and x9F is
reserved for other Unicode mischief.

I had a similar problem with a binary datastream for a barcode.  There, the
string contained characters in the above range and the default process
converted them all to x3F's.

I solved that problem by using the little known (but loved)  "8859_1"
encoding when converting MyString to bytes.

                                 MyString.getBytes("8859_1"),

The default CharToByteConverter was clearly performing the same unicode
translation, and by explicity specifying 8859_1 encoding, the conversion
maintained the integrity of the x80 through x9F values.


My question is:  How do I perform the analgous "fix" to the URL() API?   I
presume that somewhere in the process of transmitting my GET string to the
server, a default encoding is being used.  If I can somehow establish the
encoding as 8859_1 on that process, I'll bet my message gets through as
intended.  But I don't see anywhere in the API, or the URL() source code,
where one has the ability to do this.

This is a HARD one!   Anyone have any thoughts?

Best

Harry
Technical Details
Message-ID: <3af356bd_2@dnews>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!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,5b605b92ac2631d2,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-05-04 18:40:03 PST
From: "Harry Whitehouse" <harry@envmgr.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: Bad URL(), Bad Encoder, Bad...
Date: Fri, 4 May 2001 18:26:46 -0700
Lines: 38
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: <3af356bd_2@dnews>
X-Trace: dnews 989025981 38.168.115.135 (4 May 2001 18:26:21 -0700)
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews