· Jan 19, 2017

Import data with special charactes (čšž)

Does anyone has any experiance importing data to Cache which contains special characts like ščž?


I have tried several options, but nothing really works. :)



Discussion (11)0
Log in or sign up to continue


we need much more details.

What exactly did you tried? How do you import data? What's the source of the data? What do you mean by "nothing works"?

What version of Caché do you have (exact $zv)? What locale this instance have?

I have no problems importing this data from UTF-8 file.

USER>set f = ##class(%Stream.FileCharacter).%New()

USER>write f.LinkToFile("c:\temp\demo.txt")
USER>set line = f.Read()

USER>write line


803U means that installation is Unicode.

1) What locale do you have? You can check it in Management Portal -> System Administration -> Configuration -> National Language Settings -> Locale Definitions.

2) Please double-check that file is indeed in UTF-8 format.

3) Can you reproduce this problem with small file?
For example, create small text file with just three symbols: ščž
Save it in UTF-8
And read it as above in my example. Does it work?