MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

ReadList - Import - and Unicode

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115156] ReadList - Import - and Unicode
  • From: eros olmi <erosolmiz at hotmail.com>
  • Date: Mon, 3 Jan 2011 03:54:38 -0500 (EST)

In Mathematica v8 i am using this way to read the contents of a unicode file saved in utf-8 formattxt = Import["file.txt",CharacterEncoding -> "UTF-8"]w = ReadList[StringToStream[txt], Record, RecordLists -> True]the output, like this:{{unicode chars},{unicode chars},{unicode chars}}the letters displayed correctly even if i don't use CharacterEncoding -> "UTF-8"but usingReadList["file.txt", Record]will return the file as a  garbage characters , and setting $SystemCharacterEncoding = "UTF-8"$CharacterEncoding = $SystemCharacterEncodingdoes not cure the problem since ReadList can't accept CharacterEncoding -> "UTF-8" in its syntax unlike Import.are there some solutions to this phenomena.thankseros


  • Prev by Date: Import, ReadList, and Unicode
  • Next by Date: Re: Home Edition limitations?
  • Previous by thread: Re: Import, ReadList, and Unicode
  • Next by thread: dissabling code segments