Hi,

I want to use some eggs and I need them to handle UTF-8.  By "handle
UTF-8" I mean "treat strings as UTF-8", so that

   (string (string-ref "ç" 0)) => "ç"

for example.

CHICKEN's string-related procedures "accept" UTF-8 strings, but it
doesn't mean they will correctly handle them.

To properly handle UTF-8, we have the utf8 egg.  If I understand
correctly, the only way for eggs to properly support UTF-8 is by using
the utf8 egg (or an equivalent implementation).  If eggs do not
explicitly handle UTF-8 (e.g., by using the utf8 egg), operations like
string-ref and string-set! will screw things up when given UTF-8
strings.  That's the case for some eggs that manipulate strings.

I need UTF-8 support in some eggs that currently don't handle UTF-8.
Assuming we won't have proper UTF-8 support in the core anytime soon,
what's the best way to approach this?  Here are some options I thought
(I must tell in advance none sounds good to me):

1. Have <egg> and <egg>-utf8 variants.  Or, more generally, <egg> and
   <egg>-<encoding> variants.  That would turn our coop into a disgusting
   mess and would be a nightmare to egg authors.

2. Make eggs install <egg> and <egg>-<encoding> modules.  So, you can
   (use <egg>) or (use <egg>-<encoding>) depending on your needs.

3. Manually forking and patching eggs on the user end.

4. ?

Best wishes.
Mario
-- 
http://parenteses.org/mario

_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to