Some Korean words are not properly displayed

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Greenwood JJ
Newbie
Posts: 1
Joined: Tue Sep 28, 2021 9:19 pm
Contact:

Some Korean words are not properly displayed

#1 Post by Greenwood JJ »

I am currently translating English games into Korean to play it myself, but the main character's name written in Korean is not properly displayed in a specific part of the game. I think only that part is not supported by Unicode.

Below is the code from entering the character's name to where the problem arises.

Code: Select all

    define pla = Character("James", color="#ee1c0d", image="pla")
    
    init python:
    player = "James"

    def player_name(newstring):
        store.player = newstring
        
                                                      #Game Start
    $ player = ""
    
    call screen playerInput
    if player != "":
        $ pla = Character('[player]', color="#ee1c0d", image="pla")
 
    screen playerInput:
    text "{size=40}{i}Input player name.{/i}{/size}" xpos 1080 ypos 480 xalign 0.5 yalign 0.5
    add Input (size=40, default="James", changed=player_name, length=12, xpos= 1060, ypos = 540)
    key "K_RETURN" action Return()
    imagebutton focus_mask True idle "buttons/Ok_idle.png" hover "buttons/Ok_hover.png" action Return() pos 965,0 xalign 0.5 yalign 0.5

Code: Select all

    ally = str(pla)

Code: Select all

    text "[ally]" xpos 549 ypos 507 xalign 0.0
So it's the text = "[ally]" part that has problem. When I enter a Korean name on the playerInput screen, unknown characters are output from text="[ally]".
In all other parts of the game, Korean letters are displayed without any problems..

Variable viewer in the part where the problem occurs, it is as shown in the picture below.

Image

I think it's because there's no "u" in front of ally = ''... But I don't know what to do. Is there a solution?

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]