how to spell letters with accent

Mar 25, 2009 at 5:27pm

how to spell letters with accent

hi,

i try to spell this sentence “ce qui était prévu”.
using spell and itoa, i lose “é”.

how to do ti please ?
thx.
f./

#43015
Mar 25, 2009 at 5:59pm

Yes, I’ve seen this mentioned before. The é is converted to two ints by atoi.
_
johan

– Pasted Max Patch, click to expand. –
#154150
Mar 25, 2009 at 6:03pm

yes exactly.
so how to spell the sentence ?
now i’m trying with regexp but i’m lost…
mister emmanuel, do you read this ? help… Smile

#154151
Mar 25, 2009 at 6:40pm

This is still spelling the sentence except that the accented e is given two integers, a letter and a combining mark. You can just as easily take it apart and put it back together, what exactly are you trying to do?

lh

– Pasted Max Patch, click to expand. –
#154152
Mar 25, 2009 at 7:31pm

thx. i’m trying to do something like this :

f./

– Pasted Max Patch, click to expand. –
#154153
Mar 25, 2009 at 7:45pm

i just noticed that regexp doesn’t put out “é” anymore. i don’t know why. it was working just before to send the patch… ??

maybe i got it : regexp ([\W|\w]) ??
so i corrected the previous patch…

#154154
Mar 25, 2009 at 8:46pm

You could perhaps try to store the letters you are going to show in a [coll] rather than a [zl queue] because then you can store the two integers for e + accent together at one index. Then all you have to do is check whether you have one or two items in the list and route them through a [sprintf] with the right number of “%c” arguments. Here’s an example patch.

lh

– Pasted Max Patch, click to expand. –
#154155
Mar 26, 2009 at 8:19am

thx. it’s interesting. i’ll have a look.
quickly with that solution we lose space between words.
thx again.
f./

#154156
Mar 26, 2009 at 11:22am

This is presumably an artifact of the change to Unicode that came with Max 5.

You’ll probably have to read up a bit on UTF encoding. Sorry, I don’t know all the ins and outs myself.

The upside is that once you get this to work on Max 5, your patch will work identically on Mac OS and Windows. That was generally not the case on Max 4.

#154157
Jun 27, 2013 at 6:31am

this works for me

<code>

– Pasted Max Patch, click to expand. –

</code>

#254257

You must be logged in to reply to this topic.