W
williams.wilkie
Hello! If this is the wrong group my apologies. I'll accept pointing
in the right direction if there is one.
We have several users in our company cutting and pasting from Word
into our CMS and now have the need to convert from "Windows-1252" to
"utf-8"
for in-place editing I have been using
perl -MEncode=from_to -i -pe 'from_to($_, "windows-1252", "utf-8")'
file1.txt file2.txt
I am now needing to convert multiple files in a dir and another
developer mentioned that if UTF-8 and Windows-1252 are intermixed then
there could be some confusion of the two character sets together.
Transliteration was suggested..
tr/\x92/\N{RIGHT SINGLE QUOTATION MARK}/;
for example.
What I am wondering is if that is indeed the case. I don't want to
have to resort to transliteration if it isn't necessary.
Maybe I need some kind of check to see if a file is encoded a certain
way before figuring out how to jump into it. I can't ever remember
using Encode before and now we need it on a massive scope.
Any advice would be appreciated.
Wilkie
Flames go quietly to /dev/null
in the right direction if there is one.
We have several users in our company cutting and pasting from Word
into our CMS and now have the need to convert from "Windows-1252" to
"utf-8"
for in-place editing I have been using
perl -MEncode=from_to -i -pe 'from_to($_, "windows-1252", "utf-8")'
file1.txt file2.txt
I am now needing to convert multiple files in a dir and another
developer mentioned that if UTF-8 and Windows-1252 are intermixed then
there could be some confusion of the two character sets together.
Transliteration was suggested..
tr/\x92/\N{RIGHT SINGLE QUOTATION MARK}/;
for example.
What I am wondering is if that is indeed the case. I don't want to
have to resort to transliteration if it isn't necessary.
Maybe I need some kind of check to see if a file is encoded a certain
way before figuring out how to jump into it. I can't ever remember
using Encode before and now we need it on a massive scope.
Any advice would be appreciated.
Wilkie
Flames go quietly to /dev/null