Kara-Moon Forum
April 18, 2024, 09:29:51 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can go back to the main site here: Kara-Moon site
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Unicode  (Read 2594 times)
sciurius
Sr. Member
****
Posts: 443



« on: April 18, 2020, 02:44:23 PM »

I seem to recall that MMA was constrained to Latin-1 due to python2 problems.
I tried UTF-8 input while using python3 and it does not blow up, although it does not understand multibyte characters in chord names.
Non-latin in groove names seems to work.

Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #1 on: April 18, 2020, 04:31:14 PM »

Yes, it's documented that way to cover my ass Smiley If it works, great ... if not ... well.... Multi-byte characters, etc. will not work in chord names since a simple match is done: If "Cm" doesn't equal "Cm" it's not "Cm". I think you could use chord define to create names with multi-byte without problems. It's not that MMA really cares, it's just not designed to care.
Logged

My online life: http://www.mellowood.ca
sciurius
Sr. Member
****
Posts: 443



« Reply #2 on: April 18, 2020, 06:32:28 PM »

Well, this works:

Code:
DefChord ♩ (0, 4, 7, 11) (0, 2, 4, 5, 7, 9, 11)
Plectrum Shape C♩  0 2 2 0 1 0
 1   C♩

That's all I need (so far Smiley ).
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #3 on: April 18, 2020, 08:56:44 PM »

Right, that should work. Hope you're not expecting other people to read your code a hundred years from now Smiley
Logged

My online life: http://www.mellowood.ca
sciurius
Sr. Member
****
Posts: 443



« Reply #4 on: April 18, 2020, 09:25:42 PM »

I admit my example was a bit contrived. But I have no problems imagining that some Indian composer will write things like

Code:
Groove डरलाग्दो
...


Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #5 on: April 18, 2020, 11:02:20 PM »

 Grin
Logged

My online life: http://www.mellowood.ca
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.05 seconds with 19 queries.