473,461 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Convertabilty String to extended ASCII

dzenanz
45
If someone comes by the same problem as me (converting string to 8-bit ascii codes), here is the solution:

Expand|Select|Wrap|Line Numbers
  1. String s="ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ";
  2. byte ascii[]=s.getBytes("Cp437");
Cp437 can be replaced by IBM437, but not by Windows-1252, Latin1, US-ASCII (this is 7-bit ascii) and ISO-8859-1.

My problem was that I was trying to use "ISO-8859-1" (being nice standards-compliant guy), "ISO_8859_1", "8859_1" and such, instead going immediately for the code page 437 (DOS-US, OEM-DOS).

I hope this will help someone.
Apr 4 '08 #1
1 7263
BigDaddyLH
1,216 Expert 1GB
If someone comes by the same problem as me (converting string to 8-bit ascii codes), here is the solution:

Expand|Select|Wrap|Line Numbers
  1. String s="ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ";
  2. byte ascii[]=s.getBytes("Cp437");
Cp437 can be replaced by IBM437, but not by Windows-1252, Latin1, US-ASCII (this is 7-bit ascii) and ISO-8859-1.

My problem was that I was trying to use "ISO-8859-1" (being nice standards-compliant guy), "ISO_8859_1", "8859_1" and such, instead going immediately for the code page 437 (DOS-US, OEM-DOS).

I hope this will help someone.
I guess it all hinges on how one defines "extended ASCII".
Apr 4 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: john | last post by:
On my form i have a message box called txtItemDesc that displays the french phrase qualité Père Noël. Now then when i run this code on that text box: Dim chrArr() As Char chrArr =...
18
by: Zygmunt Krynicki | last post by:
Hello I've browsed the FAQ but apparently it lacks any questions concenring wide character strings. I'd like to calculate the length of a multibyte string without converting the whole string. ...
11
by: Kai Bohli | last post by:
Hi all ! I need to translate a string to Ascii and return a string again. The code below dosen't work for Ascii (Superset) codes above 127. Any help are greatly appreciated. protected...
3
by: pkumar | last post by:
How to convert this byte array to string byte b=new byte; Is there any function or I need read one by one and build the string thanks
18
by: Ger | last post by:
I have not been able to find a simple, straight forward Unicode to ASCII string conversion function in VB.Net. Is that because such a function does not exists or do I overlook it? I found...
3
by: quat | last post by:
Hi, I have a char* string where I assigned a string literal with the British pound symbol, which is included in the extended ASCII, at least on my OS. However, when I cout the string, I get a...
18
by: John | last post by:
Hi, I'm a beginner is using C# and .net. I have big legacy files that stores various values (ints, bytes, strings) and want to read them into a C# programme so that I can store them in a...
6
by: AG | last post by:
I have a file that contains ASCII and Extended ASCII characters. I need to get the file contents into a string, but the Extended ASCII characters (dec 128 and 129) are being changed to dec 63. I...
13
by: ramif | last post by:
Is there a way to print extended ASCII in C?? I tried to code something, but it only displays strange symbols. here is my code: main() { char chr = 177; //stores the extended ASCII...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.