About TADS3 show Chinese problem

I have tried to write Chinese fiction with to TADS3,but frobtads and Gargoyle show word is messy code(���),Have what solution?

PS:Because I’m an English newbie, I have grammar errors. xwx(This paragraph is copying)

2 Likes

Is there the same problem with QTads? That’s the interpreter I recommend for TADS… are they Unicode characters that you’re trying to display? What charset directive are you using in your source files? Unicode characters can be used in strings with a \u prefix…

2 Likes

Because I useing to be gnome-desktop,so I do not install QT and QTads,I used “en_us.h” and “adv3.h” in source files.my /lib file in does not have “cn_cn.*”.I tried to convert chinese text to a Unicode code ,just as “\u8fd9\u662f\u5f00\u59cb\u623f\u95f4”,but it as before messy code.

You can run QT applications under Gnome. If you want to do that you have to install QT but not KDE.

As a Chinese, I think Chinese parser IF would be interesting to see because Chinese grammar can differ from the conventional way of phrasing commands. For example, there could be several ways how you phrase “take (the) bottle out of (the) bag” in Chinese: 把瓶子拿出包里,把瓶子拿出包,从包里拿出瓶子(from the bag take the bottle),or the simplest but most awkward 拿瓶子出包. I haven’t really written IF so it would be interesting to see how you deal with the problem.

6 Likes

I try on windos it still messy code or “?” and Player Kit report an error is: “Warning :no mapping file is available for the local character set “CP936”.The system will use a default ASCII character set mapping instead,so accented characters will be displayed without their accents”.but i not understand setting of characters.

2 Likes

Oh my! to see a fatherland man is very lucky! I am not alone.(have bit odd.)

3 Likes

Hmmm, a new problem. i tried to assign characters.just like "charset “zh_CN.UTF-8” " which this is linux character format ,but it report error is “unexpected or invalid #charset”. I do not know how to write this code.and i have the header file in not the “tcerrnum.h” and “vmerrnum.h” file,is this already deleted?

1 Like

You don’t need to install Qt. You shouldn’t need to install anything, really. Just download the Linux AppImage and it should just run.

2 Likes

Hmmm in fact, I use “./QTads.AppImage” at the time of, it says “qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.”. so I alwaly don’t use QTade,and i don’t have Qt installed at the time of reporting the error.

1 Like

oh!sorry, I didn’t realise the Qt had already been deleted.

1 Like

I have tried Qtads,which is a good solution.the Chinese text transition \u format,it shows!


Summary:
1.Using Qtads.
2.Transitioning Chinese text to Unicode “\u” format.

5 Likes

You don’t need to use any u codes. You can just write text in any Chinese script directly in your .t source files. Just make sure the first line in your files is:

#charset "utf-8"

Example:

#charset "utf-8"
#include <adv3.h>
#include <en_us.h>

kitchen: Room {
    '厨房'
    "这里闻起来像熏肉。"
}

The text editor you’re using must be configured to save in UTF-8 format. (On Linux, this is probably the default anyway.)

7 Likes

Wait, what? There are other people writing with TADS in China? I thought I was the only one.
I’d be interested in seeing your game! I’m learning Chinese and always thought IF would be great for language learning.

2 Likes

Yes, you’re not alone,on the Interactive Fiction of the Chinese web is rare(I’m Chinese),and my original intention is to study English.

1 Like

Hmmm, a new problem,I tried to use ‘东’ to remap ‘east’, because it allows using Chinese like English motion commands.The code is “dobjFor(‘东’) remapTo(East)”.
but it is causing the errors.
It says:
anachy.t(21): error: ‘=’ required between property name and value - found “‘\ufffd\ufffd\ufffd’”
anachy.t(21): error: invalid lvalue - cannot assign to expression on left of “=”
anachy.t(21): error: expected ‘,’ or ‘)’ in argument list, but found “Action”
anachy.t(21): error: invalid syntax for __objref() operator
anachy.t(21): error: propertyset pattern string “‘*Dobj’\ufffd\ufffd\ufffd’'” is invalid

1 Like

dobjFor is not for defining vocabulary. It’s for handling actions. The parameter it takes is the name of a source code class, without the Action suffix. If you want to handle the TakeAction, you use dobjFor(Take).

If you want to change the vocabulary from “east” to “东”, you need to look at adv3/en_us/en_us.t to see how it’s done for English and adapt it to Chinese.

1 Like

Hmm. If I want to use the Chinese word as a command, what should I do?xwx

1 Like

You can start here:

http://www.tads.org/xlat3/xlat.htm

1 Like

seems not working:

TADS Compiler 3.1.3  Copyright 1999, 2012 Michael J. Roberts
	Files to build: 3
	symbol_export ietuye.t -> obj/ietuye.t3s
ietuye.t(5): error: unexpected or invalid #charset
Errors:   1
Warnings: 0

not a great issue for me, in the ßtest context, I can use “test” or “beta” or “tester(s)” instead of ßtest/tester(s), but there’s also an interesting thing, hopefully not only to Italians, from

in the “english vs. Italian” contribuited notes, Signor Bianchi (clearly a Southerner like me…) fails to note that the Volturno river (the notational border between Northern Italy and Southern Italy/Magna Grecia) can be wider as the Atlantic (the notational border between US and UK english): indeed in his table of prepositions uses the south italian terms (e.g. “colla” instead of “con la”) :smiley:

Best regard from (South) Italy,
dott. Piergiorgio.

2 Likes