HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Problem in using the UTF-8 !!!!!!!! Plz help me ou...
Operating System - HP-UX
1830909
Members
1781
Online
110017
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2004 08:45 PM
07-15-2004 08:45 PM
Problem in using the UTF-8 !!!!!!!! Plz help me out
hi to All,
I am facing a problem in the java program . The problem is thats
1) I have a text file which i saved in UTF-8 encoding containing only the ASCII characters
2)When i am reading the file using the Reader class ave the UTF-8 encoding
3) When i am reading the line this text file , i am getting one extra character in the beginning of the everyline
I am not able to understand from where this extra characters comes
But when i make a file text using the Writer class having the encoding UTF-8 then there is no extra character
I am facing a problem in the java program . The problem is thats
1) I have a text file which i saved in UTF-8 encoding containing only the ASCII characters
2)When i am reading the file using the Reader class ave the UTF-8 encoding
3) When i am reading the line this text file , i am getting one extra character in the beginning of the everyline
I am not able to understand from where this extra characters comes
But when i make a file text using the Writer class having the encoding UTF-8 then there is no extra character
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2004 09:04 PM
07-15-2004 09:04 PM
Re: Problem in using the UTF-8 !!!!!!!! Plz help me out
try to look at the iconv command to change the encoding format/character set of your file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2004 10:46 AM
07-16-2004 10:46 AM
Re: Problem in using the UTF-8 !!!!!!!! Plz help me out
You are most likely seeing a carriage return in the file.
Brian
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2004 04:18 PM
07-16-2004 04:18 PM
Re: Problem in using the UTF-8 !!!!!!!! Plz help me out
hai,
Your text file format is containing one more ascii character. We can identify that by,
cat | head -2 | od -bc
You will see encodings of ascii characters,text file will contain ASCII 13 character on unix. You have to change it with dos2ux input-file. It will change that file with that ascii character.
Example:>
cat hai.text | od -bc
0000000 164 145 163 164 015 012 150 141 151 015 012 150 145 154 154 157
t e s t \r \n h a i \r \n h e l l o
0000020
dos2unix hai.text
After change,
0000000 164 145 163 164 012 150 141 151 012 150 145 154 154 157
t e s t \n h a i \n h e l l o
0000016
see dos2unix man page to know more.
Your text file format is containing one more ascii character. We can identify that by,
cat
You will see encodings of ascii characters,text file will contain ASCII 13 character on unix. You have to change it with dos2ux input-file. It will change that file with that ascii character.
Example:>
cat hai.text | od -bc
0000000 164 145 163 164 015 012 150 141 151 015 012 150 145 154 154 157
t e s t \r \n h a i \r \n h e l l o
0000020
dos2unix hai.text
After change,
0000000 164 145 163 164 012 150 141 151 012 150 145 154 154 157
t e s t \n h a i \n h e l l o
0000016
see dos2unix man page to know more.
Easy to suggest when don't know about the problem!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP