I need help with xFF!

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
zhek0s
Prole
Posts: 8
Joined: Fri Nov 07, 2014 3:02 pm

I need help with xFF!

Post by zhek0s »

Hi every one. Im have very big problem(maybe only for me).
My project needs input from cmd.exe, but it have some problems with numbers like 2xFF048 on utf-8 encoding without BOM.
utf-8.lua and libraries like them dont help.
Help me please.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: I need help with xFF!

Post by s-ol »

zhek0s wrote:Hi every one. Im have very big problem(maybe only for me).
My project needs input from cmd.exe, but it have some problems with numbers like 2xFF048 on utf-8 encoding without BOM.
utf-8.lua and libraries like them dont help.
Help me please.
Well, show us your code and the exact problem you ran into.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
zhek0s
Prole
Posts: 8
Joined: Fri Nov 07, 2014 3:02 pm

Re: I need help with xFF!

Post by zhek0s »

n = os.tmpname ()
os.execute ("chcp 437")
os.execute ("tasklist > " .. n)
for line in io.lines (n) do
text[#text+1]=line
print(line)
end
end
os.remove(n)
User avatar
zhek0s
Prole
Posts: 8
Joined: Fri Nov 07, 2014 3:02 pm

Re: I need help with xFF!

Post by zhek0s »

I need some systeminfo. I have trubles with numbers that cmd.exe returns, for exemple: 2xFF048 KB (you can see it when set encoding on notepad to utf-8 without BOM).
if i run something like os.execute("help >"..n), no errors and normal text.
Really dont know what to do...
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: I need help with xFF!

Post by s-ol »

zhek0s wrote:I need some systeminfo. I have trubles with numbers that cmd.exe returns, for exemple: 2xFF048 KB (you can see it when set encoding on notepad to utf-8 without BOM).
if i run something like os.execute("help >"..n), no errors and normal text.
Really dont know what to do...
And what is the error you are experiencing?

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
zhek0s
Prole
Posts: 8
Joined: Fri Nov 07, 2014 3:02 pm

Re: I need help with xFF!

Post by zhek0s »

line 27: Decoding error: invalid utf-8
At line 27 i have lg.print(text)
Post Reply

Who is online

Users browsing this forum: No registered users and 62 guests