Forums > MaxMSP

how to spell letters with accent


FP
March 25, 2009 | 5:27 pm

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


March 25, 2009 | 5:59 pm

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

– Pasted Max Patch, click to expand. –


FP
March 25, 2009 | 6:03 pm

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


March 25, 2009 | 6:40 pm

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


FP
March 25, 2009 | 7:31 pm

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

f./

– Pasted Max Patch, click to expand. –


FP
March 25, 2009 | 7:45 pm

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…


March 25, 2009 | 8:46 pm

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


FP
March 26, 2009 | 8:19 am

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


March 26, 2009 | 11:22 am

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.


June 27, 2013 | 6:31 am

this works for me

<code>

– Pasted Max Patch, click to expand. –

</code>


Viewing 10 posts - 1 through 10 (of 10 total)