Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AlphaTex not supporting multi-bytes characters in lyrics #579

Closed
2 of 6 tasks
lannka opened this issue Apr 3, 2021 · 3 comments · Fixed by #580
Closed
2 of 6 tasks

AlphaTex not supporting multi-bytes characters in lyrics #579

lannka opened this issue Apr 3, 2021 · 3 comments · Fixed by #580
Assignees
Labels
area-file-formats Related to supported file formats state-accepted This is a valid topic to work on.

Comments

@lannka
Copy link

lannka commented Apr 3, 2021

Expected Results

AlphaTex should render multi-bytes characters (such as CJK languages) in lyrics

Observed Results

CJK characters do not show in lyrics.

Steps to Reproduce

Link to jsFiddle, CodePen, Project etc.:
In lyrics, put some CJK chars (chars that have more than 1 byte).

  1. https://alphatex-multi-bytes-char.glitch.me/

Further details

I think the problem might live here:

private nextChar(): number {
let b: number = this.data.readByte();
if (b === -1) {
this._ch = 0;
} else {
this._ch = b;
this._curChPos++;
}
return this._ch;
}

Your environment

Version

  • 1.0
  • 1.1
  • 1.2
  • 1.3-alpha.##

Flavor

  • JavaScript
  • .net

System

@Danielku15 Danielku15 added 🚀 type-improvement area-file-formats Related to supported file formats state-accepted This is a valid topic to work on. and removed 🕷️ type-bug labels Apr 3, 2021
@Danielku15
Copy link
Member

Indeed the alphaTex parser does not respect the right input string encoding. Will work on an improved reading in this area.

@Danielku15
Copy link
Member

And it's ready, next 1.3-alpha package should have the changes in. Non-Ascii (ANSI), CJK, Emojis, all work now:
image

@lannka
Copy link
Author

lannka commented Apr 3, 2021

Awesome! Thanks for the quick fix.

@Danielku15 Danielku15 added this to the [v1.3.0] Platform Improvements and Maintenance milestone Nov 4, 2021
@Danielku15 Danielku15 moved this to Done in Version 1.3 Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-file-formats Related to supported file formats state-accepted This is a valid topic to work on.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants