frotz icon indicating copy to clipboard operation
frotz copied to clipboard

Accents and other special characters missing

Open vanfanel opened this issue 10 years ago • 16 comments

Hi,

I am trying to use an spanish translation for "Adventure", but accents and other characters like ñ letter and opening "¡" are missing. It seems Frotz is still missing UTF-8, right?

vanfanel avatar Oct 26 '15 01:10 vanfanel

Correct. I'm concentrating now on getting audio working correctly.

DavidGriffith avatar Oct 26 '15 04:10 DavidGriffith

Great to hear it will be fixed, David! Thanks :+1:

vanfanel avatar Nov 01 '15 13:11 vanfanel

Did it ever get to work? I mean, the missing accents, etc. I am going to do a gameplay of Zork in spanish soon (there's a translated version) with some friends, and I'd love to do it with Frotz on the Raspberry Pi :)

vanfanel avatar Jan 30 '17 17:01 vanfanel

Nothing yet.

DavidGriffith avatar Jan 31 '17 02:01 DavidGriffith

Hello, same "issue" with Italian translation of Zork. Can't wait to see it fixed, thanks! :D

alessioscand avatar Apr 12 '17 05:04 alessioscand

Any news on this? Thanks!

vanfanel avatar May 12 '17 11:05 vanfanel

Nothing yet. I've been working on other stuff.

DavidGriffith avatar May 13 '17 06:05 DavidGriffith

Any news on this, @DavidGriffith ? I still want to play "Aventura" (the spanish version of "Adventure") on the Raspberry Pi! :dancing_men: (BTW, I fixed Hypseus, I seem to recall you were interested on it for the Pi)

vanfanel avatar Oct 16 '17 17:10 vanfanel

Nothing new. I do have some time tonight and tomorrow to study the problem.

DavidGriffith avatar Oct 17 '17 04:10 DavidGriffith

@DavidGriffith : Any news on this? I am having friends coming home soon who would enjoy the spanish translation of Adventure and Zork! :)

vanfanel avatar Jan 21 '18 16:01 vanfanel

No news. Honestly, I'm not at all clear how I'd tackle this problem.

DavidGriffith avatar Jan 24 '18 06:01 DavidGriffith

I tried the game Adventure in Spanish and all seems ok with accents. I tried with Gargoyle-Frotz, Dos-Frotz, and Linux-Frotz (with scrit: luit -encoding iso-8859-1 frotz -d $1) and all seems ok. The game: https://www.ifarchive.org/if-archive/games/zcode/spanish/aventura.zip

auraes avatar Feb 11 '18 13:02 auraes

@auraes : Thanks for the tip! However, isn't luit an X11-only thing? I run frotz on real TTYs. @DavidGriffith: All luit does seems to do is convert to any given encoding... Wouldn't it be possible just to make FROTZ to output in a given encoding by passing it an encoding type parameter?

vanfanel avatar Feb 11 '18 15:02 vanfanel

With wide character functions and ncursew, it's probably possible to do something!

//gcc -Wall -W -std=c99 accents.c -otest
#include <wchar.h>
#include <locale.h>
const wchar_t *accents = L"¡ ¿ á í ó ú ñ Ñ Ó Ú Í Á É ª º";
int main(void)
{
	setlocale(LC_ALL, "");
	wprintf(L"\nAcentos españoles: %ls\n", accents);
	return 0;
}

auraes avatar Feb 11 '18 18:02 auraes

@DavidGriffith : What do you think about @auraes proposed solution?

vanfanel avatar Mar 18 '18 14:03 vanfanel

@vanfanel I think it's good, but I really don't know how to go about implementing it. I'm open for suggested patches.

DavidGriffith avatar Mar 21 '18 08:03 DavidGriffith