how to spell letters with accent

FP's icon

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./

jvkr's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

FP's icon

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...

Luke Hall's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

FP's icon

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

f./

Max Patch
Copy patch and select New From Clipboard in Max.

FP's icon

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...

Luke Hall's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

FP's icon

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

Peter Castine's icon

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.

Karl Kliem's icon
Max Patch
Copy patch and select New From Clipboard in Max.

this works for me