• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[#Red] Red language group

DocKimbel
26-Sep-2012
[2266]
You need to change the encoding selector when saving with Notepad 
to UTF-8.
MagnussonC
26-Sep-2012
[2267]
Yes, I testad with UTF-8 encoded file
Pekr
26-Sep-2012
[2268]
doc - in the greek case I get just a square ...
MagnussonC
26-Sep-2012
[2269]
tested
Pekr
26-Sep-2012
[2270]
the square char can be seen on the screenshot I posted - http://www.xidys.com/pekr/red/red-unicode-bug.jpg
DocKimbel
26-Sep-2012
[2271x3]
Pekr: see my piratepad page.
You can just copy/past your console output there.
Can you paste me your DOS output of the hello script I've provided 
there?
Pekr
26-Sep-2012
[2274]
Not yet ... deleting all the repository. I deleted hello.red, and 
no way I can get tortoisegit to get it sync - it just keeps telling 
me I am uptodate
DocKimbel
26-Sep-2012
[2275]
Just copy/paste the code from piratepad to %hello.red
Pekr
26-Sep-2012
[2276x4]
When copying back to piratepad, it looks ok, but I will make a screenshot 
...
Maybe it is a font problem with the console then?
http://xidys.com/pekr/red/red-unicode-bugs.jpg
as you can see in my output, Chinese is not there, and third greek 
char is not there too ... but when copying from the console and pasting 
into Notepad, it shows the chars ...
DocKimbel
26-Sep-2012
[2280]
Ah, the squares were for Chinese characters...that's normal, Consolas 
cannot display CJK on western Windows.
Pekr
26-Sep-2012
[2281x2]
yes, chinese, plus one greek char ...
I know about the chinese, you talked about it here, but the third 
greek char?
DocKimbel
26-Sep-2012
[2283x3]
Strange, that character displays fine on my Windows 7...
See: http://static.red-lang.org/hello_unicode.png
My Windows version is 6.1.7600 while yours is 6.0.6002. That might 
explain the differences.
Pekr
26-Sep-2012
[2286]
I am still on Vista, in 2 months on Windows 8 - another adventure 
:-)
DocKimbel
26-Sep-2012
[2287x2]
Are you sure you're not using Lucida? When I switch to Lucida, I 
get that 3rd greek character issue.
Vista, then Win8...you're not skipping the right Windows versions. 
;-)
Pekr
26-Sep-2012
[2289x2]
I know, but I need new NTB after almost 6 years - at least core i5, 
8GB RAM, SSD disk :-)
yes, my font is Lucida Console. There is only one other option - 
raster ... I can't select any other font in that dialog ...
DocKimbel
26-Sep-2012
[2291]
If you want you can manually install Consolas font as explained here: 
http://www.hanselman.com/blog/UsingConsolasAsTheWindowsConsoleFont.aspx
Pekr
26-Sep-2012
[2292]
OK, but the other reported things helped to find some bugs? All was 
it all just a font issue?
DocKimbel
26-Sep-2012
[2293]
No, there were bugs and that last one is a font issue.
Pekr
26-Sep-2012
[2294]
Downloaded Console2, which allows to have tabs, and allows me to 
change fonts, so I just choosed Consolas and the output is correct 
...
Andreas
26-Sep-2012
[2295x2]
Happy to report that Unicode on Linux with an all-UTF8 setup works 
just fine for me.
I noticed that the red/tests/hello.red file is UTF-8 with a BOM -- 
I'd suggest dropping the BOM, as using a BOM with UTF8 is not recommended.
DocKimbel
26-Sep-2012
[2297]
No problem to drop the BOM(b)! :-)
Andreas
26-Sep-2012
[2298]
Now off to try what happens with a Latin1 environment, but I guess 
it won't work :)
Pekr
26-Sep-2012
[2299]
OK, so now I am back after the reboot, so my default Vista console 
uses nice Consolas font, and it now displays everything (apart from 
Chinese) correctly ...
DocKimbel
26-Sep-2012
[2300x2]
Red currently maps only to Unicode C printing functions. We could 
tweak the code to detect (for Unix platforms) the locale and fall 
back to Latin1 if required.
Pekr: good!
Pekr
26-Sep-2012
[2302]
So, what's next? :-)
DocKimbel
26-Sep-2012
[2303x3]
Andreas: do you think we should add Latin1 locale support too or 
just assume that now everybody use Unicode-capable terminals?
Next: char! and all series actions already present in block! implemented 
for string!
Should be just a couple of hours of work, but I need first to fix 
one or two tickets for Kaj.
Arnold
26-Sep-2012
[2306]
Now Red can output texts it can produce strings with html code? And 
so theoretically is up to CGI processing maybe with a little help 
from REBOL. Or is that too early?
GrahamC
26-Sep-2012
[2307]
Can red access stdin and stdout ?
Pekr
26-Sep-2012
[2308x4]
Not yet imo. There's imo no I/O apart from print ....
but - Red apps is an executable, so theoretically, on systems like 
Linux, maybe it can be piped?
hmm, but it would have to support stdin/out for that probably anyway 
:-)
Kaj wrapped some libraries, maybe those cover some ground there, 
e.g. Curl binding allows you to work with networking:

http://www.red-lang.org/p/contributions_20.html
Kaj
26-Sep-2012
[2312x2]
There are functions capable of stdin/out in the C library binding. 
Some of them are included in Red/System itself
Those can be inlined in Red, but Red itself currently only has print 
to stdout
DocKimbel
26-Sep-2012
[2314x2]
We'll add stdin proper support when we'll implement console:// scheme.
We could add CGI support earlier though.