Hi All,
I have recently written a piece of code in Java in eclipse IDE. The code accepts input string, looks for certain special control characters ( 0x8A, 0x8B etc ) and splits the string at those places and takes certain formatting actions on the string(like moving following string token to next line). I ve written JUnit test cases for the same. Now the problem is, everything works fine if Text file encoding is set to ISO-8859-1 for my project (option available under project tab in eclipse ), but when it is set to Cp1252, those special control characters are not recognized and so text formatting does not happen. My JUnit test cases also fail coz of this text file encoding settings. Please help me to resolve this issue. I want the code to run fine and Unit tests to run successful even when text file encoding is set to Cp1252... Any help will be greatly appreciated and thanks in advance.
Urgent Help required regarding character encoding in Java !!!
Started by Prasad DP, Feb 17 2011 06:58 AM
1 reply to this topic
#1
Posted 17 February 2011 - 06:58 AM
|
|
|
#2
Posted 17 February 2011 - 11:21 AM
I believe it would be beneficial to view both encodings and their differing codepoints. Your ISO-8859-1: ISO/IEC 8859-1 - Wikipedia, the free encyclopedia and CP1252 Windows-1252 - Wikipedia, the free encyclopedia .
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









