473,385 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

non ascii chracter problem

i'll try to explain my problem shortly...

char wrt[50];
char word[50];

strcpy(wrt,"şç");
printf("%s\n",wrt);
//i get â–* as output

gets(word); //i will write şç
printf("%s \n",word);
//output of this is correct,şç

How can i solve this?
Any suggestions?

Oct 25 '07 #1
1 1302
Burak <bu***********@gmail.comwrites:
i'll try to explain my problem shortly...

char wrt[50];
char word[50];

strcpy(wrt,"şç");
printf("%s\n",wrt);
//i get â–* as output

gets(word); //i will write şç
printf("%s \n",word);
//output of this is correct,şç

How can i solve this?
These things are very hard to debug over Usenet. I can not be sure of
what you have in your C file or in your output since simply copying
into a message can change the character encoding.
Any suggestions?
Best guess: the program you use to type in your C code uses a
different character encoding from the terminal/console you run it on.
To get a better-informed guess, ask in a group that knows about your
development environment.

--
Ben.
Oct 25 '07 #2

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

Similar topics

2
by: Martín Marconcini | last post by:
Hello there, I'm writting (or trying to) a Console Application in C#. I has to be console. I remember back in the old days of Cobol (Unisys), Clipper and even Basic, I used to use a program...
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...
8
by: Dakkar | last post by:
I have an illegal character error so i used @ escape character but it doesnt work how can i make this work possible String dir = myproc.MainModule.FileName.ToString(); FileVersionInfo info =...
5
by: Mike Currie | last post by:
Can anyone explain why I'm getting an ascii encoding error when I'm trying to write out using a UTF-8 encoder? Thanks Python 2.4.3 (#69, Mar 29 2006, 17:35:34) on win32 Type "help",...
3
by: questionit | last post by:
Hi Experts how to implement this in Java . example problem: 1) Input string e.g "HAL" 2) Output IBM ( each letter in string replaced with next character whatever comes in ABC... Thanks
399
by: =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= | last post by:
PEP 1 specifies that PEP authors need to collect feedback from the community. As the author of PEP 3131, I'd like to encourage comments to the PEP included below, either here (comp.lang.python), or...
4
by: =?Utf-8?B?Um9zaGFuIFIuRA==?= | last post by:
Hi All, I am new to C# programming; I am developing an application for recording audio data using voice modem. I am using HyperTerminal to manually process audio data. The modem when configured...
1
by: asmitag5 | last post by:
Hello sir I am using flex++ to perform character parsing and tokenisation in my application. But facing problem when EBCDIC characters are provided as input. The application hangs and...
17
by: newcoder10 | last post by:
Hi All, I would like to know what's the best way to write function(global) in asp.net c# Framework 2.0 to check for textbox in a form (i have about 80 textbox on one form and I have many forms and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
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
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,...
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...

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.