unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Printing utf8 strings
@ 2008-12-08 15:20 Stanislav Ievlev
  2008-12-08 15:25 ` Stanislav Ievlev
  2008-12-08 15:48 ` Neil Jerram
  0 siblings, 2 replies; 5+ messages in thread
From: Stanislav Ievlev @ 2008-12-08 15:20 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

Greetings!

Why results of (display) and (write) functions on same utf-8 string are too
different?

--
$ guile
guile> (define a "строка")
guile> (display a)
строкаguile> (write a)
"�x81�x82�x80ока"guile>
--

--
With best regards
Stanislav Ievlev.

[-- Attachment #2: Type: text/html, Size: 352 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Printing utf8 strings
  2008-12-08 15:20 Printing utf8 strings Stanislav Ievlev
@ 2008-12-08 15:25 ` Stanislav Ievlev
  2008-12-08 15:27   ` Stanislav Ievlev
  2008-12-08 15:48 ` Neil Jerram
  1 sibling, 1 reply; 5+ messages in thread
From: Stanislav Ievlev @ 2008-12-08 15:25 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

2008/12/8 Stanislav Ievlev <stanislav.ievlev@gmail.com>

> Greetings!
>
> Why results of (display) and (write) functions on same utf-8 string are too
> different?

It's very strange that one symbols ('о' - russian 'o')  I see without
changes, but others ('с' - russian 's') in quoted form.


>
>
> --
> $ guile
> guile> (define a "строка")
> guile> (display a)
> строкаguile> (write a)
> "�x81�x82�x80ока"guile>
> --
>
> --
> With best regards
> Stanislav Ievlev.
>
>

[-- Attachment #2: Type: text/html, Size: 1041 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Printing utf8 strings
  2008-12-08 15:25 ` Stanislav Ievlev
@ 2008-12-08 15:27   ` Stanislav Ievlev
  0 siblings, 0 replies; 5+ messages in thread
From: Stanislav Ievlev @ 2008-12-08 15:27 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

This is a guile 1.8.5

2008/12/8 Stanislav Ievlev <stanislav.ievlev@gmail.com>

>
>
> 2008/12/8 Stanislav Ievlev <stanislav.ievlev@gmail.com>
>
>> Greetings!
>>
>> Why results of (display) and (write) functions on same utf-8 string are
>> too different?
>
> It's very strange that one symbols ('о' - russian 'o')  I see without
> changes, but others ('с' - russian 's') in quoted form.
>
>
>>
>>
>> --
>> $ guile
>> guile> (define a "строка")
>> guile> (display a)
>> строкаguile> (write a)
>> "�x81�x82�x80ока"guile>
>> --
>>
>> --
>> With best regards
>> Stanislav Ievlev.
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 1460 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Printing utf8 strings
  2008-12-08 15:20 Printing utf8 strings Stanislav Ievlev
  2008-12-08 15:25 ` Stanislav Ievlev
@ 2008-12-08 15:48 ` Neil Jerram
       [not found]   ` <c5318fd90812080754m1f5351fbi83cef5f478bbd924@mail.gmail.com>
  1 sibling, 1 reply; 5+ messages in thread
From: Neil Jerram @ 2008-12-08 15:48 UTC (permalink / raw)
  To: Stanislav Ievlev; +Cc: guile-devel

2008/12/8 Stanislav Ievlev <stanislav.ievlev@gmail.com>:
> Greetings!
>
> Why results of (display) and (write) functions on same utf-8 string are too
> different?

Because Guile knows nothing at all about UTF-8, I'm afraid.  To the
extent that anything works at all with UTF-8 strings, that's just
luck.

(For another example, try doing a (string-set! ...) on one of the
letters in "строка".)

Regards,
        Neil

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Printing utf8 strings
       [not found]     ` <49dd78620812091417q4e3f9387idd4019593422ff9c@mail.gmail.com>
@ 2008-12-10  8:16       ` Stanislav Ievlev
  0 siblings, 0 replies; 5+ messages in thread
From: Stanislav Ievlev @ 2008-12-10  8:16 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 949 bytes --]

10 декабря 2008 г. 1:17 пользователь Neil Jerram
<neiljerram@googlemail.com>написал:

> 2008/12/8 Stanislav Ievlev <stanislav.ievlev@gmail.com>:
> >
> > I think this is a bug,   because different symbols has different external
> > representation ;)
>
> Not sure I'm understanding you.  Clearly lack of Unicode/UTF-8 support
> is an important missing feature; are you saying something other than
> that?

 Current (write) implementation "quote" random subset of non-ascii symbols,
but not all non-ascii symbols.

Are you planning to add unicode strings in next big release?

>
> >
> > Well, How to output string  "as is" to terminal in example bellow?
> >
> > --
> > (define  a (gettext "string" "dictionary" "ru_RU.UTF8"))
> > (write a) ;; ???
>
> Using `display', as your previous example showed.  But really it's
> just luck that this works.

 Please, save this "feature" in 1.8.x, otherwise it's impossible to use
guile in   real applications ;)

[-- Attachment #2: Type: text/html, Size: 1690 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-12-10  8:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-08 15:20 Printing utf8 strings Stanislav Ievlev
2008-12-08 15:25 ` Stanislav Ievlev
2008-12-08 15:27   ` Stanislav Ievlev
2008-12-08 15:48 ` Neil Jerram
     [not found]   ` <c5318fd90812080754m1f5351fbi83cef5f478bbd924@mail.gmail.com>
     [not found]     ` <49dd78620812091417q4e3f9387idd4019593422ff9c@mail.gmail.com>
2008-12-10  8:16       ` Stanislav Ievlev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).