Hi, I've been dealing with some strings including asian characters.
 
In case of indexing of ASCIIString, there's no problem. 
But when dealing with a UTF8String, I could get only 1st and last 
characters.
 

julia> name1="John Doe"
"John Doe"

julia> name2="김아무개"
"김아무개"

julia> name3="近藤雅子"
"近藤雅子"

julia> name1[1]
'J'

julia> name1[2]
'o'

julia> name2[1]
'김'

julia> name2[2]
ERROR: UnicodeError: invalid character index
 in next at unicode/utf8.jl:65
 in getindex at strings/basic.jl:37

julia> name3[1]
'近'

julia> name3[2]
ERROR: UnicodeError: invalid character index
 in next at unicode/utf8.jl:65
 in getindex at strings/basic.jl:37

julia> name3[end]
'子'

julia> name3[end-1]
ERROR: UnicodeError: invalid character index
 in next at unicode/utf8.jl:65
 in getindex at strings/basic.jl:37
julia>

 
Is this result a bug? Otherwise do I miss something?

Joungmin
 

Reply via email to