Illegal Character
Author |
Message |
templest
|
Posted: Wed Aug 18, 2004 10:50 am Post subject: Illegal Character |
|
|
I'm writing an installer in turing, first step: extracting + inserting files into one big file to acompany the installer exe. I've got that down, but with files that use funy charcters (ie: ©, £, ñ, ₧, etc) I get an "Illegal Charcter" error. I'm loading these as strings, is there something I need to do? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Wed Aug 18, 2004 12:12 pm Post subject: (No subject) |
|
|
well some ASCII values were not ment to be displayed you're better off with binaries |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
templest
|
Posted: Wed Aug 18, 2004 4:01 pm Post subject: (No subject) |
|
|
I hate turing. |
|
|
|
|
|
beard0
|
Posted: Tue Aug 31, 2004 8:35 pm Post subject: (No subject) |
|
|
another option is to use a char as opposed to a string variable. char allows chr(0) and chr(128), whereas strings don't. |
|
|
|
|
|
beard0
|
Posted: Tue Aug 31, 2004 8:42 pm Post subject: (No subject) |
|
|
Just realised - this leads me into my own problem. I have been trying to write my own web server, and have been comming along quite well until I got to images. I can send them, but because they have a ton of chr(0) and chr(128) in them, I have to send them as individual characters, rather than as part of a longer string as I was able to do with html files:
code: | loop
sendString := ""
for x : 1 .. 255
exit when eof (chan)
get : file, data
sendString += data
end for
put : ns, sendString ..
exit when eof (chan)
end loop |
(data was defined as a char)
The problem with this, is that this makes it hellishly slow. It took well over 30 seconds for it to send my browser a medium sized 16 color bmp, over localhost. Anybody have any ideas on how to clear this problem up? |
|
|
|
|
|
beard0
|
Posted: Sat Sep 04, 2004 6:45 pm Post subject: (No subject) |
|
|
I found a solution: for anybody else who wants to do something similar, to send the image you have to read, rather than get from the image file, and then, although you read, dont write to send it, but put it to the netstream. |
|
|
|
|
|
rizzix
|
Posted: Sun Sep 05, 2004 12:53 am Post subject: (No subject) |
|
|
may i also suggest u read it into a nat1 and then put that nat1 into ur netstream.. the keyword here is nat1 (which represents 1 unsigned byte).. u should do this for all *non ascii* data |
|
|
|
|
|
|
|