PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Text file with international characters & symbols how to translate to English US  (Read 130 times)

Sonia Cruz

  • Member
  • **
  • Posts: 6
    • View Profile
Hello all!
Do you know how and when detect special characters contained in rows of a text file coming from international symbols of, for example, addresses of Europe, South America, etc., how to translate / convert them to character code equivalent to the English (United States) language? This is for an electronic file that the format do not accept special characters and symbols.   
Thanks in advance!
Regards
Sonia Cruz

ksproul

  • Silver Member
  • ***
  • Posts: 31
    • View Profile
There are a few ways to tackle this.  Check out the tbl= read option and table directive, the translate directive, and the tbl() function.


Manual links:
https://manual.pvxplus.com/PXPLUS/directives/read.htm
https://manual.pvxplus.com/PXPLUS/directives/table.htm
https://manual.pvxplus.com/PXPLUS/directives/translate.htm
https://manual.pvxplus.com/PXPLUS/functions/tbl.htm
Ken Sproul
DPI Information Services, Inc.

Devon Austen

  • Staff
  • Diamond Member
  • *****
  • Posts: 277
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
If the international symbols are Unicode (UTF-8,UTF-16) you can pass in the input text through the CVS() function and convert to ASCII. This still allows for some international symbols which are part of ASCII though. If your problem is non ASCII then CVS will work for you.

CVS(inputText$,"UTF8:ASCII")

https://manual.pvxplus.com/?functions/cvsextend.htm 
Software Developer for PVX Plus Technologies LTD.