Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8646681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:52:36+00:00 2026-06-12T12:52:36+00:00

I am working on a jQuery plugin for converting Latin characters to Japanese kana

  • 0

I am working on a jQuery plugin for converting Latin characters to Japanese kana symbols (live example) in real-time (auto-correct) and it works correctly if I’m not typing too fast.. Which is a problem.

For example:

wakarimasu -> わかります

However, when I type at my normal speed I get this:

wakarimasu -> わかりあすm (which is actually wakariasum, cursor between “す” and “m” in the end)

If I type it without “su”, I get this:

wakarima -> わかりあm (which is actually wakariam, cursor between “あ” and “m” in the end)

I figured out why and how this is happening. Basically, “ri – り” symbol is still converting from Latin to Japanese kana while I already typed “m” in and it finishes just a little bit before I manage to type “a” in. Since my function positions the cursor after each conversion, it positions the cursor between “ri” and “m” and that is where my “a” ends up.

This happens for other words as well, but I took this one as an example.

Is there a way I could track the cursor position in a smarter way or is there a way to update/convert/replace only parts of textfield without updating the whole textfield (the way it works now is it fetches what is in the textfield, replaces Latin with kana inside a variable inside the function, updates the textfield with the new string from a variable and then positions the cursor)? Telling visitors not to type too fast wouldn’t really be the way to go..

Legend: wa=わ ka=か ri=り ma=ま su=す a=あ

Source can be viewed at the link I provided. Thanks.

Edit: One more thing to think about is that a user might move cursor left and right to add or remove characters/symbols. This complicates positioning a little bit but it works at the moment.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:52:39+00:00Added an answer on June 12, 2026 at 12:52 pm

    To close this one up, I managed to figure out that the problem was actually that the third character (“m” in this case) went into the same .keyup iteration as “ri” and not after it as I previously thought (same symptom, but different reason)..

    To fix this I just modified the .keyup code to add +1 to the offset to shift the cursor to the right for one position if after the conversion there is a latin (roumaji) character left in the string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating my first jQuery plugin and have a somewhat working example (see
I am working with a jQuery plugin that has the following snippet in it:
i am working on struts2-jquery plugin . the below snippet is working fine in
I am working on a jquery plugin which takes json data from the php
I'm working with a jQuery plugin that has this: var $el = $(this), $wrapper
I am trying to get this awesome JQuery plugin working with SQL Server. I
I'm working with the jQuery Validation plugin and I wrote the following code which
I am currently working with the jQuery validation plugin , and I want to
I have a jQuery plugin, supersized 3.2.7 working in Chrome and Firefox but just
I'm currently working with ckeditor and i'm using the jquery plugin for this editor

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.