473,698 Members | 1,947 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 6158
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
1924
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
4048
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
2034
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
2665
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
2225
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
1959
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
4331
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
8672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9155
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8890
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,...
0
8858
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7711
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6517
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
5859
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();...
2
2322
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
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.