The solution is to use ultraedit convert function(convert ascii to utf-8(unicode edition)). Originally, i use the notepad++ to convert utf-8 without BOM, and it seems not work as expected.
Now, the split function can work correctly without any force_encoding, but the input from html should be converted using force_encoding("UTF-8").
Unfortunately, i can not use DOM parser to do xml parsing.
[edit]
I have used the libxml and its performance is good enough for me. I setup the old version libxml and copy the ruby files, dll to plugin folder of sketchup, it works for me.
Use the axis tool to localize ea line before making ea group
(to fix - explode -make axes along the line - make group - repeate for ea line)
Boxes should be gone.
Standard Ruby Library folders DO NOT belong in SketchUp's "Plugins" folder.
They belong in the Standard Ruby Library folders.
Once a user installs the full Ruby edition, SketchUp's Ruby can access it's library folders, by pushing library paths into SketchUp's **$LOAD_PATH** array.