Retrieve layer name list from file with different language than English


I’ve retrieved all the layer names in grasshopper, but some layers in my rhino file have named in different language, specifically Korean texts.
Rhino 7 is displaying it without an issue however ghphyton doesn’t show it correctly even I tried to encode it into 'utf-8'.

import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
import codecs

sc.doc = Rhino.RhinoDoc.ActiveDoc

layers = rs.LayerNames()

if layers:
    for layer in layers: print layer.encode('utf-8')
sc.doc = ghdoc

drawing-example-도면1.3dm (50.8 KB)

What should I do in this case?
Thank you.

What happens if you simply print layer? You might not need to encode in UTF-8.

Very interesting,
It wasn’t working on my home desktop that I need to encode it with utc-8.

Now I am testing with my office pc and it works without encoding.

I’ll go check it with my home pc tonight.
Thank you very much!~