473,722 Members | 2,295 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ISO-Latin Encoding

I am trying to write a for loop that will print all the ISO-Latin characters
to a database. However: I am not sure exactly how to go about printing the
ISO-Latin character set. Would anyone be able to give me some pointers? I
think I have to use Encoding eISOLatin = Encoding.GetEnc oding(28591); but
after this: I am a bit lost.

Thanks
Andy
Nov 17 '05 #1
9 6159
Andy <An**@discussio ns.microsoft.co m> wrote:
I am trying to write a for loop that will print all the ISO-Latin characters
to a database. However: I am not sure exactly how to go about printing the
ISO-Latin character set. Would anyone be able to give me some pointers? I
think I have to use Encoding eISOLatin = Encoding.GetEnc oding(28591); but
after this: I am a bit lost.


It would help if you'd say exactly what you mean by "printing" to a
database.

I suspect you don't need an encoding at all though - if your database
understands Unicode appropriately, you should just be able to write all
the characters to the database as strings. The exact range of
ISO-Latin-1 is somewhat interesting - the Unicode standard implies that
it's Unicode values 0-255, but I believe it's *actually* 32-127 and
160-255.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #2
Jon:

I have been tasked with writing a small app to print all ISO-Latin
characters into an AS/400 table, so that we are able to assertain which come
through correctly and which ones we can support from .Net through to the
AS/400. I was told that we did'nt want ANSCII characters, as they would be
truncated.

I am lost on how to exactly print the ISO-Latin values so that when inserted
into a table on our AS/400, we can determine which are supportable.

I hope this helps further explain the issue.

Thanks
Andy

"Jon Skeet [C# MVP]" wrote:
Andy <An**@discussio ns.microsoft.co m> wrote:
I am trying to write a for loop that will print all the ISO-Latin characters
to a database. However: I am not sure exactly how to go about printing the
ISO-Latin character set. Would anyone be able to give me some pointers? I
think I have to use Encoding eISOLatin = Encoding.GetEnc oding(28591); but
after this: I am a bit lost.


It would help if you'd say exactly what you mean by "printing" to a
database.

I suspect you don't need an encoding at all though - if your database
understands Unicode appropriately, you should just be able to write all
the characters to the database as strings. The exact range of
ISO-Latin-1 is somewhat interesting - the Unicode standard implies that
it's Unicode values 0-255, but I believe it's *actually* 32-127 and
160-255.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #3
Andy <An**@discussio ns.microsoft.co m> wrote:
I have been tasked with writing a small app to print all ISO-Latin
characters into an AS/400 table, so that we are able to assertain which come
through correctly and which ones we can support from .Net through to the
AS/400. I was told that we did'nt want ANSCII characters, as they would be
truncated.
What do you mean by "ANSCII"? Do you mean ASCII, or ANSI?
I am lost on how to exactly print the ISO-Latin values so that when inserted
into a table on our AS/400, we can determine which are supportable.


I still don't know what you mean by "printing" a character into a
table. Do you just mean inserting a string value into a table? If so,
just create a parameterised SQL statement which inserts the parameter
into the table, and call it repeatedly, once per character in the
ranges 32-127 and 160-255. (Alternatively, call it once with a string
with all those characters in - I think the former would make it easier
to work out what doesn't work though, especially if you include a
second parameter which is an integer, the Unicode value you're
inserting.)

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #4
Jon:

Thanks again for the response, but I am still a little lost. I am not sure
how to format the SQL string for insertion into the table. I have tried
various scenarios, and nothing has seemed to work.

Here is my code, perhaps that will help:

Encoding eISOLatin = Encoding.GetEnc oding(28591);
for(int i = 160; i <= 255; i++)
{
sSQL = "INSERT INTO tEncoding(s_Enc oding) VALUES ('')";
oCommand.Comman dText = sSQL;
oCommand.Execut eNonQuery();
}
Thanks
Andy
"Jon Skeet [C# MVP]" wrote:
Andy <An**@discussio ns.microsoft.co m> wrote:
I have been tasked with writing a small app to print all ISO-Latin
characters into an AS/400 table, so that we are able to assertain which come
through correctly and which ones we can support from .Net through to the
AS/400. I was told that we did'nt want ANSCII characters, as they would be
truncated.


What do you mean by "ANSCII"? Do you mean ASCII, or ANSI?
I am lost on how to exactly print the ISO-Latin values so that when inserted
into a table on our AS/400, we can determine which are supportable.


I still don't know what you mean by "printing" a character into a
table. Do you just mean inserting a string value into a table? If so,
just create a parameterised SQL statement which inserts the parameter
into the table, and call it repeatedly, once per character in the
ranges 32-127 and 160-255. (Alternatively, call it once with a string
with all those characters in - I think the former would make it easier
to work out what doesn't work though, especially if you include a
second parameter which is an integer, the Unicode value you're
inserting.)

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #5
Andy <An**@discussio ns.microsoft.co m> wrote:
Thanks again for the response, but I am still a little lost. I am not sure
how to format the SQL string for insertion into the table. I have tried
various scenarios, and nothing has seemed to work.

Here is my code, perhaps that will help:

Encoding eISOLatin = Encoding.GetEnc oding(28591);
for(int i = 160; i <= 255; i++)
{
sSQL = "INSERT INTO tEncoding(s_Enc oding) VALUES ('')";
oCommand.Comman dText = sSQL;
oCommand.Execut eNonQuery();
}


Okay, well as I said, you don't need to use an encoding.

You should change your SQL so that it has a parameter (the exact
details of which will depend on the database driver) and then set the
parameter to a string value:

string characterAsStri ng = Convert.ToStrin g((char)i);

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #6
Andy.

Jon gave the solution. But my question is;

- Why would you want do this?

I struggled for minutes now (ages for me), and I can't think of a single
application or feature that would want a couple of chars in a table. Do tell
us... please...

Curious
- Michael S
Nov 17 '05 #7
Mike:

It is a long drawnout process: but we take orders online. We have
international orders that need special characters, and some logos use special
characters that MUST be on the item ordered. In order to get to our
printing system: the orders must go through various steps and applications
(some very poor third party applications). We want to run a test through the
entire process all the way to our AS/400 so that we can advertsie which
special characters can be processed from start to finish.

I have been charged with doing this test.

I hope this answers your question.

"Michael S" wrote:
Andy.

Jon gave the solution. But my question is;

- Why would you want do this?

I struggled for minutes now (ages for me), and I can't think of a single
application or feature that would want a couple of chars in a table. Do tell
us... please...

Curious
- Michael S

Nov 17 '05 #8
Jon:

Thanks for the help and patience. I got way lost when my boss said it had
to be the ISO-Latin set. Thanks for all the help.

Andy

"Jon Skeet [C# MVP]" wrote:
Andy <An**@discussio ns.microsoft.co m> wrote:
Thanks again for the response, but I am still a little lost. I am not sure
how to format the SQL string for insertion into the table. I have tried
various scenarios, and nothing has seemed to work.

Here is my code, perhaps that will help:

Encoding eISOLatin = Encoding.GetEnc oding(28591);
for(int i = 160; i <= 255; i++)
{
sSQL = "INSERT INTO tEncoding(s_Enc oding) VALUES ('')";
oCommand.Comman dText = sSQL;
oCommand.Execut eNonQuery();
}


Okay, well as I said, you don't need to use an encoding.

You should change your SQL so that it has a parameter (the exact
details of which will depend on the database driver) and then set the
parameter to a string value:

string characterAsStri ng = Convert.ToStrin g((char)i);

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 17 '05 #9

"Andy" <An**@discussio ns.microsoft.co m> wrote in message
news:EF******** *************** ***********@mic rosoft.com...

I have been charged with doing this test.


We feel sorry for you. I hope you get paid a lot for doing this.
If not, your manager hates you and it's time to look for better job. =)

Happy Coding
- Michael S
Nov 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
476
by: jrefactors | last post by:
When people say C programming language, they mean ISO C89? The latest C is ISO C99, but I heard this is not commonly used. What's the differences between ISO C89 and ISO C99? Please advise. Thanks
22
1927
by: Sensei | last post by:
Hi! I'm looking for useful libraries that are strictly ISO C. Any kind of library, from lists, stacks, to trees, searching tools, sorting tools... really *any* kind. Do you have any idea? :) -- Sensei <senseiwa@mac.com>
22
4056
by: pemo | last post by:
ISO C does not allow extra ';' outside of a function int n;; int main(void) { .... } Anyone care to enlighten me as to why ISO C does not allow this, but
2
2036
by: John Daly | last post by:
Hope this is the right place to post this. I recently downloaded iso disc imsges, however my new pc did not come with burning software, and i can not find my old discs. I tried to use the Burning Wizzard built into Windows XP but it jsut copied the ISO file as is. Now for some assumptions on my part. I am assuming an .iso file is similar in nature to a zip file in that the directory strucutre and the files are packed into 1 larger file....
9
2647
by: Alok | last post by:
Hi, I want to purchase the ISO C++ standard ISO/IEC 14882:2003 specification for reference. The ANSI store sells the PDF or CD-ROM of the document for $30 http://webstore.ansi.org/ansidocstore/product.asp?sku=INCITS%2FISO%2FIEC+14882-2003, but the ISO store sells the seemingly same document for CHF 352 ( or over $281.82 http://www.google.com/search?q=352+chf+in+usd )...
52
1565
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I convert a Number into a String with exactly 2 decimal places? ----------------------------------------------------------------------- When formatting money for example, to format 6.57634 to 6.58, 6.5 to 6.50, and 6 to 6.00? Rounding of x.xx5 is uncertain, as such numbers are not represented exactly.
1
2667
by: danikar | last post by:
Is there a way to open a file that is inside of an ISO in python? Say I have an ISO file, danikars.iso and on the iso there is a file called information.txt I want to be able to do something like this. iso_h = openiso("danikars.iso") file_h = iso_h.extract("information.txt")
11
2226
by: ManicQin | last post by:
Hi, I was about to buy the Standard but then I found this link http://www.usatlas.bnl.gov/~dladams/cpp/INCITS+ISO+IEC+14882-2003.pdf Hmmmm... ... The link seems legit so ... what gives? Thanks...
1
1962
by: scotter86 | last post by:
Hi everyone, I'm trying to "burn","mount" what ever you want to call it, an .iso file to a hard disk partition. What I'm trying to do is get this iso on a partition and boot it much like I would a cd. I saw a couple examples where it was able to work using a boot loader, and just pointing to the iso, but i want to do it with out using a boot loader. The iso is just a linux live cd, but I was curious weather or not this is actually possible. ...
10
4334
by: tvnaidu | last post by:
I am using Three pthread functions below, I got ISO error, then I declared int variable called val123, then I assigned, but still I am getting error, any idea?. also I included pthread.h. compiling in Linux with GCC. pthread_cond_signal(&(receiverConf->receive_q_cond)); pthread_cond_destroy(&(receiverConf->receive_q_cond)); pthread_mutex_destroy(&(receiverConf->receive_q_lock)); Main.cpp:545: ISO C++ forbids declaration of ` ...
0
8739
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9157
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6681
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5995
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4502
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2602
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.