Extra spaces in .XLS files
Peter TB Brett
peter.brett at livecode.com
Wed Sep 21 09:51:32 EDT 2016
On 21/09/2016 13:25, Roger Eller wrote:
> Has anyone here ever ran into this? When I put URL
> ("file:/path/to/file.xls") into field "imported text", EVERY character has
> an extra space following it.
>
> Example: c e l l 1 TAB c e l l 2 TAB h e l l o w o r l d
>
> I can script them away to normalize the text, but I find it to be strange.
Hi Roger,
You didn't tell LiveCode how to decode the file, so it's using it's
naive default decoding strategy (1 byte per character, native encoding)
which is almost certainly not what you want.
Try something like:
textDecode(url "binfile://path/to/file.xls", "utf-16")
This is also wrong (.xls files are big balls of complicated binary data,
not text) but it might get you marginally closer.
Peter
--
Dr Peter Brett <peter.brett at livecode.com>
LiveCode Technical Project Manager
lcb-mode for Emacs: https://github.com/peter-b/lcb-mode
More information about the use-livecode
mailing list