Replace accent character "é" with "e"
Replace accent character "é" with "e"
(OP)
hi,
I need to replace accent character "é" with "e" (I know this is not correct replacement) in my file after converting it from utf-8 to ascii.
Any help is appreciated, thanks in advance.
Command used for conversion: $iconv -c -f utf-8 -t ascii < file1.txt > file2.txt
Cheers,
BauV
I need to replace accent character "é" with "e" (I know this is not correct replacement) in my file after converting it from utf-8 to ascii.
Any help is appreciated, thanks in advance.
Command used for conversion: $iconv -c -f utf-8 -t ascii < file1.txt > file2.txt
Cheers,
BauV
RE: Replace accent character "é" with "e"
Try this, worked for my test text :
CODE
iconv -f utf-8 -t ascii//translit < file1.txt > file2.txt
Feherke.
feherke.github.io
RE: Replace accent character "é" with "e"
I did try this already, shown with Error: tomap cannot be specified with fromcode.
Any further help is appreciated.
Cheers,
BauV
RE: Replace accent character "é" with "e"
CODE
RE: Replace accent character "é" with "e"
CODE
RE: Replace accent character "é" with "e"
Both are showing errors, as below -
1) $ echo 'xáéíy' | unaccent utf-8 ---error: "ksh: unaccent: not found"
2) $ echo 'xáéíy' | sed 'y/áéí/aei/' ---error: sed: command garbled: y/áéí/aei/
I tried below command:
echo 'xá sdfdsédsfjdks íy' | sed -e 's/é/e/g' ---worked fine, result: "xá sdfdsedsfjdks íy"
sed -e 's/é/e/g' file1.txt > file1.res --- no luck
or
sed -e 's/é/e/g' < file1.txt > file1.res --- no luck
Any further suggestion plzz.
Cheers,
BauV
RE: Replace accent character "é" with "e"
$file file1.txt --- says, English text or ASCII text
Does this matter?
Cheers,
BauV
RE: Replace accent character "é" with "e"
CODE
RE: Replace accent character "é" with "e"
Cheers,
BauV.
RE: Replace accent character "é" with "e"
My file is in utf-8 and everything works.
CODE
.. and what is your operating system ?