r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3-OLD1]

Maxim
30-Oct-2009
[19312x4]
at least converging to utf-8, all scripts by all authors will work 
the same on all systems.
cause there is just ONE encoding.
but having some kind of default for read/write could be usefull, 
instead of having to add a refinement all the time, and force a script 
to expect a specific encoding.
then it would be easier to change it one place, do all I/O without 
the refinement.  and less work for another to change encoding for 
the whole app and having to put conditionals everytime we use read/write.
Pekr
30-Oct-2009
[19316]
Max - so what is an easy solution for me, to load my local scripts 
on my local system, which contain czech alphabet signs > 127?
Maxim
30-Oct-2009
[19317x4]
IIRC there was intended to have a header attribute specifying encodings 
for the script body...
don't know if its implemented or not.
I put a suggestion on the blog about allowing user-creating encoding 
maps... otherwise, you can load it as binary in R3 and just convert 
the czech chars to utf-8 multi-byte sequences and convert the binary 
to string using decode.
is the czech encoding the standard windows ansi  encoding?
PeterWood
30-Oct-2009
[19321]
Yes on Czach machines ..... I think its Windpws codepage 1250. I 
beleive the default codepage on most US machines is 1252 (MS's extended 
version of ISO-8859-1).
Maxim
30-Oct-2009
[19322]
ok yeah a few different diacritics between those two encodings
Pekr
30-Oct-2009
[19323]
how do you aproach the situation, if your script would contain two 
strings, in different encodings? Can it practicall happen?
Maxim
30-Oct-2009
[19324]
R3 will interpret litteral strings and decode them using utf-8 (or 
the header encoding, if its supported) so in this case no.


but if the data is stored within binaries (equivalent to R2 which 
doesn't handle encoding) then, yes, since the binary represents the 
sequence of bytes not chars.


if you use a utf-8 editor, and type characters above 127 and look 
at them in  notepad, you will then see the UTF-8 byte sequences (which 
will look like garbled text, obviously).
Pekr
30-Oct-2009
[19325]
Is there utf-8 version of notepad? :-)
Maxim
30-Oct-2009
[19326]
I don't know if R3 has a way of specifying the encoding litterally... 
like  UTF8{}  UTF16{}  or WIN1252{} ... this would be nice.
PeterWood
30-Oct-2009
[19327]
A script cpud have two different encodings if differenlty encoded 
files were included. For example, you could use a script from Rebol.org 
in one of your scripts. You probably use Windows Code Page 1250 but 
most scripts in the library use other encodings.


This doesn't give big problems as most of the code in the Library 
is "pure" ASCII
Maxim
30-Oct-2009
[19328]
I use uedit which handles unicode natively when you want to... a 
lot of preferences for it ...
PeterWood
30-Oct-2009
[19329]
Notepad can apparently handle both UTF-8 and UTF-16 http://en.wikipedia.org/wiki/Notepad_(Windows)
Maxim
30-Oct-2009
[19330]
it tries to detect UTF based on text content... broken up until vista.
http://en.wikipedia.org/wiki/Notepad_%28Windows%29
Carl
30-Oct-2009
[19331]
Ok, so... no one reads the wiki.  That's ok... we're all developers. 
We don't read things other than code.

So, here's a summary of R3 and Unicode:

http://www.rebol.net/r3blogs/0286.html
Gabriele
31-Oct-2009
[19332x5]
Max: maybe you should start using a real operating system. But, that 
aside, if you have any software that does not handle utf-8, simply 
trash it. guys, really, this is crazy, we are in 2009, let's put 
an end to this codepage crap!
sqlab: what you say would make some sense if converting files was 
in any way difficult. (apart from the fact that you should have stopped 
using latin1 almost 10 years ago...). I've been using utf-8 with 
R2 for years...
sqlab: rigth, let's make string handling MORE COMPLEX. we definitely 
need that. let's copy MySQL, shall we?
Max: a system wide default means that my script will NOT run in the 
same way on your system. that is the definition of bad language design.
Petr: notepad, as most windows stuff, uses utf-16. much easier to 
detect though, and R3 could do that (actually, didn't Carl just add 
that recently?) most "real" editors allow you to use whatever encoding 
you want, and definitely support utf-8.
Pekr
31-Oct-2009
[19337]
Aha, I just realised that I have to use Save-as, and choose UTF-8 
or Unicode, instead of default ANSI preset of notepad
Maxim
1-Nov-2009
[19338]
gab, having a system-wide option will allow people to use the same 
code for different encoded source data.  it doesn't break my code 
or yours.  its a setup not a definition.
shadwolf
1-Nov-2009
[19339x2]
i love that documentation on bitset http://rebol.com/r3/docs/datatypes/bitset.html
 -> I give it A+++ a you must read it documentation !!
CArl on french forum they are wating to now if you plan to bring 
rebol world to the modile phone 3 generation area ? (android windowsphone 
or iphone). Could be a good way to show that not only adobe flash 
can provide things  in that area i think. But they a special "set" 
of feature should be build in rebol to feet the particular need of 
those plateform. What do you thin about it Carl ?
Maxim
1-Nov-2009
[19341]
this is what the host code is for.
shadwolf
1-Nov-2009
[19342x2]
carl T___T i read your documentation and post and all when i get 
some  free time to do it..
maxim too many groups here i'm dizzy just looking at the list ...
Maxim
1-Nov-2009
[19344x2]
iphone will not allow any other dev tools on the iphone, unfortunately.
what people do is create an abstraction for their tools and spit 
out iphone sdk compileable code.
shadwolf
1-Nov-2009
[19346]
hum ... who said to develop an application that runs on a iphone 
you had to run it on an iphone ^^
Maxim
1-Nov-2009
[19347]
action code 3 (flash) is now also licensed.
shadwolf
1-Nov-2009
[19348x2]
maxim if we as steeve jobs gently he will accept  ^^
ok so android seems the best choice it's wide open ...
Maxim
1-Nov-2009
[19350x3]
the R3 host is what ultimately loads the rebol.dll and provides any 
platform-specific resources to it.
yep.
but creating abstractions in REBOL is quite easy (compared to other 
languages), as Oldes has shown with his impressive flash dialect
shadwolf
1-Nov-2009
[19353]
but then the ask is what kind of rebol feet the need of those fone 
(personnally VID would be an awsome way to do animated high sight 
GUI application on fones )
Maxim
1-Nov-2009
[19354]
part of SCREAM's mission is to allow compilation targets for all 
of its tools.  this won't happen soon, but its one of the reasons 
for its existence in the first place.


Oldes' Flash dialect is very high on my list of Scream subprojects.
shadwolf
1-Nov-2009
[19355]
ok well that's an idea that poped out on the french forum i wanted 
to share to carl.
Maxim
1-Nov-2009
[19356x5]
its easy to compile VID blocks into other languages.  the only real 
tricky part is the actions, which have to be compiled too... so the 
best approach is to use a dialect within your event code, and stick 
to it.  this dialect can then be built so it can compile into languages.
a lot of rebol can be converted line for line in just about any language... 
you just need to keep the compilable language basic and you should 
be fine.
its a recurring request since REBOL as firat released.  with R3 we 
will now be able to compile rebol on ANY platform, which allows us.
as firat.... was first
its possible even symbian can be compiled to  :-)
shadwolf
1-Nov-2009
[19361]
i'm lost ...  anyway  people will understand you probably better 
than me.