Hi,
I'm trying to read the belgium eid card which gives out utf8, i can
convert it to ansi but now i have the problem of converting the special
chart to oem.
utf8 to ansi
for(x=0;x<lengte;x++){
if((SubPart[x]&0x80)==0) printf("%c",SubPart[x]);
else{
unsigned char y;
y=((SubPart[x]&0x1F)<<6)|SubPart[x+1]&0x3F;
x++;
printf("%c",y);
printf("|%d|",y);
}
}
printf("\n");
Now the problem is that "+®" (é) is displayed as Ú so i need to
convert it back to é.
In but there is no ansi to oem convertor is borland C 3.1.
Regards
Laery 3 3382
Hi,
I found the answer using pc8 code table.
unsigned int oem[257]={
0, 1, 2, 3, 4, 5, 6, 7, // # 0 - 7
8, 9, 10, 11, 12, 13, 14, 15, // # 8 - 15
16, 17, 18, 19, 182, 186, 22, 23, // # 16 - 23
24, 25, 26, 27, 28, 29, 30, 31, // # 24 - 31
32, 33, 34, 35, 36, 37, 38, 39, // # 32 - 39
40, 41, 42, 43, 44, 45, 46, 47, // # 40 - 47
48, 49, 50, 51, 52, 53, 54, 55, // # 48 - 55
56, 57, 58, 59, 60, 61, 62, 63, // # 56 - 63
64, 65, 66, 67, 68, 69, 70, 71, // # 64 - 71
72, 73, 74, 75, 76, 77, 78, 79, // # 72 - 79
80, 81, 82, 83, 84, 85, 86, 87, // # 80 - 87
88, 89, 90, 91, 92, 93, 94, 95, // # 88 - 95
96, 97, 98, 99, 100, 101, 102, 103, // # 96 - 103
104, 105, 106, 107, 108, 109, 110, 111, // # 104 - 111
112, 113, 114, 115, 116, 117, 118, 119, // # 112 - 119
120, 121, 122, 123, 124, 125, 126, 127, // # 120 - 127
199, 252, 233, 226, 228, 224, 229, 231, // # 128 - 135
234, 235, 232, 239, 238, 236, 196, 197, // # 136 - 143
201, 181, 198, 244, 247, 242, 251, 249, // # 144 - 151
223, 214, 220, 243, 183, 209, 158, 159, // # 152 - 159
255, 173, 155, 156, 177, 157, 188, 21, // # 160 - 167
191, 169, 166, 174, 170, 237, 189, 187, // # 168 - 175
248, 241, 253, 179, 180, 230, 20, 250, // # 176 - 183
184, 185, 167, 175, 172, 171, 190, 168, // # 184 - 191
192, 193, 194, 195, 142, 143, 146, 128, // # 192 - 199
200, 144, 202, 203, 204, 205, 206, 207, // # 200 - 207
208, 165, 210, 211, 212, 213, 153, 215, // # 208 - 215
216, 217, 218, 219, 154, 221, 222, 225, // # 216 - 223
133, 160, 131, 227, 132, 134, 145, 135, // # 224 - 231
138, 130, 136, 137, 141, 161, 140, 139, // # 232 - 239
240, 164, 149, 162, 147, 245, 148, 246, // # 240 - 247
176, 151, 163, 150, 129, 178, 254, 152 // # 248 - 255
}
if(y>127){
printf("!%c!",oem[y]);
}
Regards
Laery th******@hotpop.com schreef: Hi,
I'm trying to read the belgium eid card which gives out utf8, i can convert it to ansi but now i have the problem of converting the special chart to oem. utf8 to ansi for(x=0;x<lengte;x++){ if((SubPart[x]&0x80)==0) printf("%c",SubPart[x]); else{ unsigned char y; y=((SubPart[x]&0x1F)<<6)|SubPart[x+1]&0x3F; x++; printf("%c",y); printf("|%d|",y); } } printf("\n");
Now the problem is that "+®" (é) is displayed as Ú so i need to convert it back to é. In but there is no ansi to oem convertor is borland C 3.1. Regards Laery
Hi,
I found the answer using pc8 code table.
unsigned int oem[257]={
0, 1, 2, 3, 4, 5, 6, 7, // # 0 - 7
8, 9, 10, 11, 12, 13, 14, 15, // # 8 - 15
16, 17, 18, 19, 182, 186, 22, 23, // # 16 - 23
24, 25, 26, 27, 28, 29, 30, 31, // # 24 - 31
32, 33, 34, 35, 36, 37, 38, 39, // # 32 - 39
40, 41, 42, 43, 44, 45, 46, 47, // # 40 - 47
48, 49, 50, 51, 52, 53, 54, 55, // # 48 - 55
56, 57, 58, 59, 60, 61, 62, 63, // # 56 - 63
64, 65, 66, 67, 68, 69, 70, 71, // # 64 - 71
72, 73, 74, 75, 76, 77, 78, 79, // # 72 - 79
80, 81, 82, 83, 84, 85, 86, 87, // # 80 - 87
88, 89, 90, 91, 92, 93, 94, 95, // # 88 - 95
96, 97, 98, 99, 100, 101, 102, 103, // # 96 - 103
104, 105, 106, 107, 108, 109, 110, 111, // # 104 - 111
112, 113, 114, 115, 116, 117, 118, 119, // # 112 - 119
120, 121, 122, 123, 124, 125, 126, 127, // # 120 - 127
199, 252, 233, 226, 228, 224, 229, 231, // # 128 - 135
234, 235, 232, 239, 238, 236, 196, 197, // # 136 - 143
201, 181, 198, 244, 247, 242, 251, 249, // # 144 - 151
223, 214, 220, 243, 183, 209, 158, 159, // # 152 - 159
255, 173, 155, 156, 177, 157, 188, 21, // # 160 - 167
191, 169, 166, 174, 170, 237, 189, 187, // # 168 - 175
248, 241, 253, 179, 180, 230, 20, 250, // # 176 - 183
184, 185, 167, 175, 172, 171, 190, 168, // # 184 - 191
192, 193, 194, 195, 142, 143, 146, 128, // # 192 - 199
200, 144, 202, 203, 204, 205, 206, 207, // # 200 - 207
208, 165, 210, 211, 212, 213, 153, 215, // # 208 - 215
216, 217, 218, 219, 154, 221, 222, 225, // # 216 - 223
133, 160, 131, 227, 132, 134, 145, 135, // # 224 - 231
138, 130, 136, 137, 141, 161, 140, 139, // # 232 - 239
240, 164, 149, 162, 147, 245, 148, 246, // # 240 - 247
176, 151, 163, 150, 129, 178, 254, 152 // # 248 - 255
}
if(y>127){
printf("!%c!",oem[y]);
}
Regards
Laery th******@hotpop.com schreef: Hi,
I'm trying to read the belgium eid card which gives out utf8, i can convert it to ansi but now i have the problem of converting the special chart to oem. utf8 to ansi for(x=0;x<lengte;x++){ if((SubPart[x]&0x80)==0) printf("%c",SubPart[x]); else{ unsigned char y; y=((SubPart[x]&0x1F)<<6)|SubPart[x+1]&0x3F; x++; printf("%c",y); printf("|%d|",y); } } printf("\n");
Now the problem is that "+®" (é) is displayed as Ú so i need to convert it back to é. In but there is no ansi to oem convertor is borland C 3.1. Regards Laery
On 17 Feb 2006 02:59:01 -0800, "th******@hotpop.com"
<th******@hotpop.com> wrote in comp.lang.c: Hi,
I'm trying to read the belgium eid card which gives out utf8, i can convert it to ansi but now i have the problem of converting the special chart to oem. utf8 to ansi for(x=0;x<lengte;x++){ if((SubPart[x]&0x80)==0) printf("%c",SubPart[x]); else{ unsigned char y; y=((SubPart[x]&0x1F)<<6)|SubPart[x+1]&0x3F; x++; printf("%c",y); printf("|%d|",y); } } printf("\n");
Now the problem is that "+®" (é) is displayed as Ú so i need to convert it back to é. In but there is no ansi to oem convertor is borland C 3.1.
Regards Laery
The C language knows nothing at all about "ansi" or "oem". Nor does
it know anything at all about glyphs, which is a term for the visual
appearance of a character produced by some sort of output device,
whether it be a video screen, a printer, or something else.
If you have the correct numerical value but your display devise shows
a different glyph that the one you want, you need to investigate the
use of things like font types, code pages, or locales in your compiler
and/or operating system.
You don't mention whether you are using Borland 3.1 for MS-DOS or for
Windows, perhaps your best bet would be in one of Borland's support in
the new:borland.public.* family on the server newsgroups.borland.com.
In any case, this is not a C language issue at all.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Thomas Matthews |
last post by:
Hi,
I'm working with Borland C++ Builder 6.2.
My project uses the std::string class. However, Borland in
its infinite wisdom has its own string class, AnsiString.
To make my life easier, I...
|
by: |
last post by:
Borland dumped all its "Borand C++ Builder" (BCB) customers. So it is our
term to dump Borland (not only BCB).
As a part of my attempt to dump long-loved BCB I'm trying to investigate how
one can ...
|
by: Siemel Naran |
last post by:
Here is a question about implicit conversion from T (&) to ptrcarray<T>.
I wrote a class
template <class T>
struct ptrcarray
{
T * array;
size_t size;
|
by: Roose |
last post by:
Just to make a tangential point here, in case anyone new to C doesn't
understand what all these flame wars are about.
Shorthand title: "My boss would fire me if I wrote 100% ANSI C code"
We...
|
by: ritchie |
last post by:
Hi,
I am trying to clear the screen in my program.
I am loking for something that will work on all compilers, especially
Borland & MS Visual Studio 6.
On Visual studio I used 'system("cls");'...
|
by: Philip Bondi |
last post by:
Hello to all SQL Server junkies who work with non-English characters:
For people running scripts from the command line using ANSI files with
special characters, it is very important to use isql...
|
by: MaartenVR |
last post by:
sub: MS SQL server and (missing) ANSI DATE-datatype
I’m working at a company who has developed a large client/server application in Delphi 6, with Interbase as the DB-server (both Borland...
|
by: wschlanger |
last post by:
Hi, the following code behaves differently for GCC/MSC and Borland C++
5.6.
The question was, what order does symbol lookup happen in?
1. declared symbols, including using'd symbols.
2....
|
by: info |
last post by:
Cognaxon has released "NIST (ANSI/NIST-ITL 1-2000) library" which
adds
the power of NIST (ANSI/NIST-ITL 1-2000) file format to your software
projects using only a few lines of code.
Additionally...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |