Skip to content

Instantly share code, notes, and snippets.

@ttdoda
Created July 3, 2020 03:48
Show Gist options
  • Save ttdoda/763bce5e80278c56de0f05967e2f2ad8 to your computer and use it in GitHub Desktop.
Save ttdoda/763bce5e80278c56de0f05967e2f2ad8 to your computer and use it in GitHub Desktop.
ng-1.5beta1-utf8に対する2byte utf-8の入力の修正
--- kanji.c.orig 2020-07-03 12:30:37.251639000 +0900
+++ kanji.c 2020-07-03 12:30:41.693271000 +0900
@@ -1018,9 +1018,11 @@
buf[0] = (char)c1;
buf[1] = (char)getkbd();
- if (!(c1 & 16))
+ if (!(c1 & 32)) {
+ /* nothing to do */
+ } else if (!(c1 & 16)) {
buf[2] = (char)getkbd();
- else if (!(c1 & 8)) {
+ } else if (!(c1 & 8)) {
buf[2] = (char)getkbd();
buf[3] = (char)getkbd();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment