Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2007

Tip: Looking for answers? Try searching our database.

character encoding problem

Thread view: 
bj - 15 Jun 2007 00:31 GMT
hi

i've got the following problem :
i'am getting some string with polish characters as some artifacts how
can i change these letters back to normal polish letters??
 i've tried something like that

new String(b.getDescription().getBytes("UTF-8"),"ISO-8859-1")

but it didn't work, i've got still some dirty characters in string

please help
Roedy Green - 15 Jun 2007 10:33 GMT
On Fri, 15 Jun 2007 01:31:51 +0200, bj
<dinamo@poczta.WYTNIJ_TOonet.pl> wrote, quoted or indirectly quoted
someone who said :

>i've got the following problem :
>i'am getting some string with polish characters as some artifacts how
[quoted text clipped - 4 lines]
>
>but it didn't work, i've got still some dirty characters in string

You have to be careful with terms. A string is 16-bit characters.  You
probably have some bytes, some sort of 8-bit encoding.

In any case, my essay on encoding should tell you more than you wanted
to know about translating back and forth.

http://mindprod.com/jgloss/encoding.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Thomas Fritsch - 15 Jun 2007 10:58 GMT
> i've got the following problem :
> i'am getting some string with polish characters as some artifacts how
[quoted text clipped - 4 lines]
>
> but it didn't work, i've got still some dirty characters in string
Are you really sure, that you want ISO-8859-1 ?
I doubt it, because ISO-8859-1 cannot represent some polish characters:
for example '\u0104' (A with cedilla below), '\u0141' (L with slash across).
Polish text is often encoded in ISO-8859-2, but not in ISO-8859-1.

Signature

Thomas



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.