Question
· 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. :)

 

thanks

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

Natasha,

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")
1
USER>set line = f.Read()

USER>write line
ščž

Thanks.

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?