[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unicode chars in scheme?
From: |
Tao Cumplido |
Subject: |
Re: Unicode chars in scheme? |
Date: |
Thu, 25 Jun 2009 14:41:40 +0200 |
> Nice work! Here's one way to simplify it.
> - Mark
>
> (define super-ref
> (list
> (cons #\A "Ø")
> ))
>
> (define (char->special x)
> (assoc-ref super-ref x))
>
> (define (super-string str)
> (let ((new ""))
> (string-for-each
> (lambda (x) (set! new (string-append new (char->special x))))
> str)
> new))
Thanks. It's always good to learn new commands and I usually don't by just
looking at the explanation in the Guile manual.
> Have you tried using ly:wide-char->utf-8 to deal with this?
>
> tf =
> #(define-music-function (parser location music) (ly:music?)
> (let ((es (ly:music-property music 'elements)))
> (ly:music-set-property! (cadr es) 'text
> (ly:wide-char->utf-8 #x00a9))) music)
>
> It's used internally for the markup command \char.
Thanks for the hint.
The problem I encountered is that this function returns a string and not a
char, so it doesn't solve what I had in mind, it just provides a different
approach to what I already did.
Thanks anyway. It's always good to get a broader overwiev of available
functions.
Regards,
Tao
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
- Unicode chars in scheme?, Tao Cumplido, 2009/06/23
- Re: Unicode chars in scheme?, Trevor Daniels, 2009/06/24
- Re: Unicode chars in scheme?, Tao Cumplido, 2009/06/24
- Re: Unicode chars in scheme?, Mark Polesky, 2009/06/24
- Re: Unicode chars in scheme?, Tao Cumplido, 2009/06/24
- Re: Unicode chars in scheme?, Mark Polesky, 2009/06/24
- Re: Unicode chars in scheme?, Tao Cumplido, 2009/06/24
- Re: Unicode chars in scheme?, Mark Polesky, 2009/06/24
- Re: Unicode chars in scheme?,
Tao Cumplido <=
- Re: Unicode chars in scheme?, Neil Puttock, 2009/06/24