- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- character encoding
Operating System - Linux
1824976
Members
4010
Online
109678
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
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
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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-09-2007 10:24 AM
тАО07-09-2007 10:24 AM
As far as I know C++ uses ANSI in order to represent its characters.
How can I read a character in greek, obtain its unicode character and write it again as a string or as a character in console.
I'm desperate with this issue. I have tried with wchar_t but I cannot find the way to use it properly and I cannot write my characteres in a terminal.
Thanks you in advance.
How can I read a character in greek, obtain its unicode character and write it again as a string or as a character in console.
I'm desperate with this issue. I have tried with wchar_t but I cannot find the way to use it properly and I cannot write my characteres in a terminal.
Thanks you in advance.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2007 10:30 AM
тАО07-09-2007 10:30 AM
Solution
Your problem doesn't stem from the language but rather with the display device. You need to understand that all the host computer does is send octets (or groups or octets in the case of wide characters) to the output device (terminal, printer, plotter, ...) and how those octets appear is solely a function of the output device itself.
The typical way this is done is to use curses to select the appropriate alternate character set.
The typical way this is done is to use curses to select the appropriate alternate character set.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2007 06:30 PM
тАО07-09-2007 06:30 PM
Re: character encoding
Can you give an example how to use curses, or a link?
Thanks.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2007 12:10 AM
тАО07-10-2007 12:10 AM
Re: character encoding
First of all, you need to set LANG appropriately. Then try to read and write char strings.
To read a character that's multibyte and convert to unicode, you must use mbtowc(3), or mbstowcs(3) for strings.
To convert that wchar_t string to utf8, you would have to use iconv(3):
cd1 = iconv_open("utf8", "ucs4");
ret = iconv(cd1, &in, &inl, &out, &outl);
To read a character that's multibyte and convert to unicode, you must use mbtowc(3), or mbstowcs(3) for strings.
To convert that wchar_t string to utf8, you would have to use iconv(3):
cd1 = iconv_open("utf8", "ucs4");
ret = iconv(cd1, &in, &inl, &out, &outl);
- Tags:
- IConv
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
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP