473,396 Members | 2,030 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,396 software developers and data experts.

operation on files, replace data in C

Hi,
I have written a program in C to copy data from input file to output file and is works. Now I want to replace some data from input file before the data will be written to output file. see piece of code bellow
[code]
if (i == '¿')
{
i = ('z');
}
else if (i == '³')
{
i = ('l');
}
else if (i == 'œ')
{
i = ('s');
}
[/CODE}
and so on. unfortunately it is not works.
Do you have any idea why the program do not recognize the strange signs from input text file? I tried change for example a to A or s to 4 and it works perfect.
or maybe you have other way to replace the strange symbols.
many thanks for help.
Kris
Jan 27 '12 #1
4 2063
johny10151981
1,059 1GB
are those character is ascii table?

If it is UTF-8 or UNICODE then you will have to change your approach a little
Jan 29 '12 #2
Hi Johny,
I not sure about ascii table.
there are letters from different language then English.
I have OS in English so when I try to use the text file some characters a displayed as above.
thanks
Jan 29 '12 #3
donbock
2,426 Expert 2GB
The C Standard says the following in regard to character constants:
the elements of the sequence [the character(s) within the single quotes] are any members of the source character set; they are mapped in an implementation-defined manner to members of the execution character set
I suppose there is an incompatibility between how your compiler represents those special characters and how they are represented in the file. Do you any documentation for the text file format?
Jan 30 '12 #4
Hi donbock,
Thanks for your reply.
I do not have any documentations for the text file.
the file is a subtitles for movie. format .txt
thanks
Jan 30 '12 #5

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

Similar topics

2
by: RAJ | last post by:
Hi, Need some advice with regards to XML files. Here is what I am trying to achieve: I have an SQL Server 7.0 database and a Web service running on a Windows 2003 enterprise machine (for...
1
by: Barbara Alderton | last post by:
I’m relatively new to .NET. I would like to write a VB.NET app (I read that using C# isn't as elegant when dealing with Office products) that reads in Excel files (forms) of both 2000 and 2003...
1
by: Kanuk | last post by:
Im using Visual basic 2005 and i want to make the bulk of my data user editable in files such as txt or dat files (maybe even xml) My questions is how do i get the data from the file.. into an...
4
by: tanyali | last post by:
using php, I wanna to get .csv files with data selected out from mysql. who knows, please help. thanks first. .~_~. Tanya
3
by: ahmurad | last post by:
Dear brothers, I have some importnat files in MS Excell / CSV format. I know php. I want to insert these files into MYSQL database to generate reports. What are the techniques to insert the ...
1
by: ahmurad | last post by:
Dear brothers, I have some importnat files in MS Excell / CSV format. I know php. I want to insert these files into MYSQL database to generate reports. What are the techniques to insert the MS...
0
by: Howard Swope | last post by:
I have an xml file that my application downloads on a periodic basis. I also have a dataset based on this that is used in the application. At present, the application takes the new downloaded xml,...
3
by: Steve Potter | last post by:
I'm working on a project to create a central administration interface for several websites located on different physical servers. You can think of the websites as a blog type application. My...
10
by: angelicdevil | last post by:
ok i have a list of data that gets displayed in listbox... i want tht when i select any value in tht listbox and click on rename it should rename tht in the database with the value i provide in...
1
by: kayox007 | last post by:
hello everyone, am having trouble creating dynamically populated XML files using data from a database. i wouldn't mind coldfussion script that can do that. thanks ya'll
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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...
0
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
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,...
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...

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.