View mode: basic / threaded / horizontal-split · Log in · Help
November 24, 2004
Re: 8-bit character encodings
Anders F Björklund wrote:
> I've written some test code for encodings...
> 
> They take a mapping (wchar[256]) from ubyte,
> which defines the 8-bit charset / encoding.
> 
> Then it can convert to and from Unicode.
> (such as the default char[] strings in D)
> 
> 
> The unoptimized D code looks like this:
> 
>> /// converts a 8-bit charset encoding string into unicode
>> char[] decode_string(ubyte[] string, wchar[256] mapping)
<snip>

Why restrict yourself to 8-bit character sets that don't include U+10000 
or above?

Stewart.
November 24, 2004
Re: 8-bit character encodings
Stewart Gordon wrote:

>> I've written some test code for encodings...
>> 
>> They take a mapping (wchar[256]) from ubyte,
>> which defines the 8-bit charset / encoding.
>>
> Why restrict yourself to 8-bit character sets
> that don't include U+10000 or above?

Because it was a quick and dirty hack, with the
sole purpose of being able to provide input and
output with consoles that don't talk Unicode...

ICU has a better "full" implementation of this ?
(as used by the Mango library posted here earlier)

--anders
November 24, 2004
Re: Mango news (was Re: 8-bit character encodings)
"Anders F Björklund" <afb@algonet.se> wrote in message | Also, the Makefile
seems a little broken since it recompiles everything?
| It should reference the object files, and not the source code directly.
|
| Something like:
|
| > %.o : %.d
| > $(DMD) -c $(DFLAGS) -o $@ $<
| >
| > libmango.a : $(OBJECTS)
| > $(AR) -r $@ $(OBJECTS)
|
| Perhaps adapted to use the $(OBJ) dir?

That's because it's often faster to recompile everything than doing it
piecemeal :-)

One of the benefits of D is the speed at which it ploughs through source,
leaving tools like make in its wake (so to speak). The latest Win32 make
file does things somewhat differently, and is more along the lines of which
you speak (builds things a package at a time, rather than the whole
enchilada), and the linux makefile is expected to migrate to a similar
strategy.

There again, I have limited experience with make; and would be more than
happy if someone were to do it properly.
November 24, 2004
Re: Mango news (was Re: 8-bit character encodings)
"Anders F Björklund" <afb@algonet.se> wrote in message
news:co23ph$1k5f$1@digitaldaemon.com...
| Kris wrote:
|
| > I'm not sure that anyone has tried it on Darwin as yet. Perhaps the
linux
| > makefile will work? This one is compatible with the Beta 9.5 download
| > (accessible via the dsource download section), and I'll update it
tomorrow
| > with the Beta 9.6 equivalent (to match the current checkins)
|
| I copied the linux makefile to darwin.make, and tried it.
| Throwed some errors and then gdc hung on FileConduit.d...
|
| I think it was, will post the actual errors on Mango forum

Thanks; I'll check it out ...

|
| > Given that the ICU stuff is so recent, it has not been linked to the
*nix
| > libs. The effort to get there is a known (and limited) quantity, but
hasn't
| > happened yet. Everything else compiles and links just fine on linux, and
the
| > vast majority of it runs without issue (there is one known problem
regarding
| > Mango.cluster on that platform).
|
| Looks like most of it is POSIX-ish, should be compilable ?

Yep. We have to provide a little bit of linker glue, in place of the Win32
DLL binding-mechanism. The file ULocale has an example of how this should
work. It's not much effort, but it just hasn't been done.
Next ›   Last »
1 2
Top | Discussion index | About this forum | D home