Unicode and replacing text

hi i have issue with unicode :slight_smile: lovely :slight_smile: but as i try to tackle this issue i have problem where replacing text doesnt work for me. here is sample:

Renaming player is action applying to topic. Understand "nickname is [text]" as Renaming player. Carry out renaming player:
	if number of characters in topic understood is less than 2 or number of characters in topic understood > 98:
		say "Nickname must be atlest 2 characters long and less than 99";
	otherwise:
		let xeme be topic understood;
		replace the text "a" in xeme with "bu";
		execute JavaScript command "return changeNickname('[xeme]');";
		now the player’s nickname is xeme;
		say "Now you are known as [xeme]";
	continue the action.

even if i put in “nickname is cha” it doesnt say “chbu” i will be trying later to change local characters couse vorple also cant work with unicode so my game chrashes

2 Likes

Prior to the bleeding-edge still-under-development version, Inform couldn’t handle user input > 255, i.e., it could only handle the Latin1 character set. If you’re using Inform 7 9.3/6M62, to the best of my recollection this version of the Unicode Parser extension works with it. If you’re using Inform 7 10.1, you’re out of luck until the next one is released (for which there’s no schedule yet).

But hey, the wait between 10.1 and 10.2 should be a lot shorter than between 9.X and 10.0!

2 Likes

One never knows. Luck is not many a person’s side…

Plus, when it does come out, will it be fixed? Or will there be a bug in it and have to redo it.
What is the real difference between Inform 7 & 10 anyway?

(EDIT: Sorry to bring it OT. Just suddenly bursted with questions!)

It used to be known as Inform 7 followed by a four-character version code, like 6L38. Now it’s known as just Inform with an incrementing version number.

1 Like

thank you all about info on unicode :slight_smile: its nice knowing there is effort for development… ive got around unicode in inform and in vorple and adjust it for php too…it was bit of a challenge but it wasnt realy hard. my problem is still that my code for substitution on text doesnt work… tho unicode challenge is accomplished i would still like to know how to manage text substitution. :slight_smile:

something like this should do it.

Carry out player-renaming:
let xeme be "[topic understood]";
if number of characters in xeme is less than 2 or number of characters in xeme > 98:
    say "Nickname must be atlest 2 characters long and less than 99";
else: [...]

topic understood is a variable of the kind snippet, which is different from a topic, both of which are different from a text. (This is one of the things that one has extremely little chance of understanding from reading the docs.)

2 Likes

thank you yes it works like a charm