Enable complex text input? #3860

Closed
CyberianWolf opened this Issue Sep 23, 2015 · 9 comments

Comments

Projects
None yet
3 participants
@CyberianWolf

Hmm..

[ Processing / Preferences / Enable complex text input (i.e. Japanese..) ]
does not work properly
in the case of the 2 bytes Asian character set Input
(i.e. Chinese, Japanese, Korean, especially in Korean).

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Sep 23, 2015

Member

What operating system? What version of Processing? What "doesn't work"?

This is so little information, how can we possibly try to fix this?

Member

benfry commented Sep 23, 2015

What operating system? What version of Processing? What "doesn't work"?

This is so little information, how can we possibly try to fix this?

@CyberianWolf

This comment has been minimized.

Show comment
Hide comment
@CyberianWolf

CyberianWolf Oct 1, 2015

I'm so sorry about that.

OS: Microsoft Windows 8.1 Enterprise K (Build 9600) // 'K' means 'Korean Language'?
Processing Version: 3.0 b7 and 3.0

On writing text with Processing 3 IDE, if the font set is the Korean character set font,

  1. each characters are over-wrapped? over-written? half-over-written!
    Interval space between (for example) 'A character' and 'B character'is very short, very very shorter than '0'. It's 'negative'. Is this called 'over-wrapped'?

Ohh, my English writing ability is very poor!!
I don't know what shoud I say. I'm not a English speaker. So, please, think about this problem.

  1. Another case, I didn't mis-type. But the result is so weird.
    No, virus, No malware. My 'new' computer is clean.

But, English goes well!

ㅠ.ㅠ;

(Wait, I'll show you some screenshots.)

processing_3_0_a_
processing_3_0_b_
processing_3_0_c_
processing_3_0_d_
processing_3_0_e_
processing_3_0_f_

I'm so sorry about that.

OS: Microsoft Windows 8.1 Enterprise K (Build 9600) // 'K' means 'Korean Language'?
Processing Version: 3.0 b7 and 3.0

On writing text with Processing 3 IDE, if the font set is the Korean character set font,

  1. each characters are over-wrapped? over-written? half-over-written!
    Interval space between (for example) 'A character' and 'B character'is very short, very very shorter than '0'. It's 'negative'. Is this called 'over-wrapped'?

Ohh, my English writing ability is very poor!!
I don't know what shoud I say. I'm not a English speaker. So, please, think about this problem.

  1. Another case, I didn't mis-type. But the result is so weird.
    No, virus, No malware. My 'new' computer is clean.

But, English goes well!

ㅠ.ㅠ;

(Wait, I'll show you some screenshots.)

processing_3_0_a_
processing_3_0_b_
processing_3_0_c_
processing_3_0_d_
processing_3_0_e_
processing_3_0_f_

@CyberianWolf

This comment has been minimized.

Show comment
Hide comment
@CyberianWolf

CyberianWolf Oct 1, 2015

But, 'Copy and Paste' function works well.

Processing 3 Input function bugs me, so, ...

I wrote the print() with Windows 8.1 K Notepad program and then copy all of the text and paste into Processing IDE.

It works well !!

So, strange!

But I love Processing!

processing_3_0_g_
processing_3_0_h_

But, 'Copy and Paste' function works well.

Processing 3 Input function bugs me, so, ...

I wrote the print() with Windows 8.1 K Notepad program and then copy all of the text and paste into Processing IDE.

It works well !!

So, strange!

But I love Processing!

processing_3_0_g_
processing_3_0_h_

@CyberianWolf

This comment has been minimized.

Show comment
Hide comment
@CyberianWolf

CyberianWolf Oct 1, 2015

I did 'copy/paste' the last line.

processing_3_0_i_

Help me, please!

I did 'copy/paste' the last line.

processing_3_0_i_

Help me, please!

@CyberianWolf

This comment has been minimized.

Show comment
Hide comment
@CyberianWolf

CyberianWolf Oct 1, 2015

// 6 characters typed but 4 characters displayed!

processing_3_0_j_

// 6 characters typed but 4 characters displayed!

processing_3_0_j_

@CyberianWolf

This comment has been minimized.

Show comment
Hide comment
@CyberianWolf

CyberianWolf Oct 1, 2015

// Another Korean Font Test.

print("Hello, James! = 헬롱, 젱임!");
// Not correct!
// Processing 3 IDE typing.

print("Hello, James! = 헬로우, 제임스!");
// Correct!
// Copy/Paste.

processing_3_0_k_

// Another Korean Font Test.

print("Hello, James! = 헬롱, 젱임!");
// Not correct!
// Processing 3 IDE typing.

print("Hello, James! = 헬로우, 제임스!");
// Correct!
// Copy/Paste.

processing_3_0_k_

@satoshiokita

This comment has been minimized.

Show comment
Hide comment
@satoshiokita

satoshiokita Feb 8, 2016

Contributor

I installed Korean input method in my window8.1 64bit(japanese). and tested above probrem.
current processing3 following method is only support Japanese. this logic can not handle korean input method correctly.

InputMethodSupport#inputMethodTextChanged

  public void inputMethodTextChanged(InputMethodEvent event) {
    if (Base.DEBUG) { // my debug print
      StringBuilder sb = new StringBuilder();
      sb.append("#Called inputMethodTextChanged");
      sb.append("\t ID: " + event.getID());
      sb.append("\t timestamp: " + new java.util.Date(event.getWhen()));
      sb.append("\t parmString: " + event.paramString());
      Messages.log(sb.toString());
    }

    AttributedCharacterIterator text = event.getText();
    committed_count = event.getCommittedCharacterCount();
    if(isFullWidthSpaceInput(text)){
      textManager.insertFullWidthSpace();
      caretPositionChanged(event);
      return;
    }
    if(isBeginInputProcess(text, textManager)){
      textManager.beginCompositionText(text, committed_count);
      caretPositionChanged(event);
      return;
    }
    if (isInputProcess(text)){
      textManager.processCompositionText(text, committed_count);
      caretPositionChanged(event);
      return;
    }
    textManager.endCompositionText(text, committed_count);
    caretPositionChanged(event);
  }
BK Key
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:02 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "" + "ㅎ", 0 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
debug: FontRenderContext is Antialiased = Antialiased text mode
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:02 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "" + "헤", 0 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
debug: FontRenderContext is Antialiased = Antialiased text mode
Starting error check
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:02 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "" + "헬", 0 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
debug: FontRenderContext is Antialiased = Antialiased text mode
Starting error check
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:08 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "헬" + "", 1 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:08 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "" + "ㄹ", 0 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
debug: FontRenderContext is Antialiased = Antialiased text mode
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:08 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "" + "로", 0 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
debug: FontRenderContext is Antialiased = Antialiased text mode
Starting error check
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:25 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, no text, 0 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:25 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "로" + "", 1 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
Starting error check

Hangul ascii type
gpf
fh
dn
, ,
wp
dla
tm
Contributor

satoshiokita commented Feb 8, 2016

I installed Korean input method in my window8.1 64bit(japanese). and tested above probrem.
current processing3 following method is only support Japanese. this logic can not handle korean input method correctly.

InputMethodSupport#inputMethodTextChanged

  public void inputMethodTextChanged(InputMethodEvent event) {
    if (Base.DEBUG) { // my debug print
      StringBuilder sb = new StringBuilder();
      sb.append("#Called inputMethodTextChanged");
      sb.append("\t ID: " + event.getID());
      sb.append("\t timestamp: " + new java.util.Date(event.getWhen()));
      sb.append("\t parmString: " + event.paramString());
      Messages.log(sb.toString());
    }

    AttributedCharacterIterator text = event.getText();
    committed_count = event.getCommittedCharacterCount();
    if(isFullWidthSpaceInput(text)){
      textManager.insertFullWidthSpace();
      caretPositionChanged(event);
      return;
    }
    if(isBeginInputProcess(text, textManager)){
      textManager.beginCompositionText(text, committed_count);
      caretPositionChanged(event);
      return;
    }
    if (isInputProcess(text)){
      textManager.processCompositionText(text, committed_count);
      caretPositionChanged(event);
      return;
    }
    textManager.endCompositionText(text, committed_count);
    caretPositionChanged(event);
  }
BK Key
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:02 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "" + "ㅎ", 0 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
debug: FontRenderContext is Antialiased = Antialiased text mode
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:02 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "" + "헤", 0 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
debug: FontRenderContext is Antialiased = Antialiased text mode
Starting error check
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:02 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "" + "헬", 0 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
debug: FontRenderContext is Antialiased = Antialiased text mode
Starting error check
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:08 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "헬" + "", 1 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:08 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "" + "ㄹ", 0 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
debug: FontRenderContext is Antialiased = Antialiased text mode
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:08 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "" + "로", 0 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
debug: FontRenderContext is Antialiased = Antialiased text mode
Starting error check
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:25 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, no text, 0 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
Starting error check
#Called inputMethodTextChanged   ID: 1100    timestamp: Mon Feb 08 14:09:25 JST 2016     parmString: INPUT_METHOD_TEXT_CHANGED, "로" + "", 1 characters committed, caret: TextHitInfo[0L], visible position: TextHitInfo[0L]
Starting error check

Hangul ascii type
gpf
fh
dn
, ,
wp
dla
tm
@satoshiokita

This comment has been minimized.

Show comment
Hide comment
@satoshiokita

satoshiokita Feb 8, 2016

Contributor

I rewirte to CJK support now. i wll send the pull-request.

Korean support!
issue3860_01

Contributor

satoshiokita commented Feb 8, 2016

I rewirte to CJK support now. i wll send the pull-request.

Korean support!
issue3860_01

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Feb 14, 2016

Member

Closed with #4293 for 3.0.2.

Member

benfry commented Feb 14, 2016

Closed with #4293 for 3.0.2.

@benfry benfry closed this Feb 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment