LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 12-08-2010, 07:44 AM   #1
plamensl
LQ Newbie
 
Registered: Oct 2004
Location: Sofia,Bulgaria
Distribution: Slackware,FreeBSD
Posts: 11

Rep: Reputation: 0
Add new encoding to terminal


Hello,
I am looking for a method to add new encoding to Gnome Terminal.
The encoding i want to add is MIK (Bulgarian DOS cyrillic encoding) and it is not found in Terminal -> Set character encoding -> Add or remove list.
Is there a way to add this encoding to the list ? Or is there some other terminal or telnet / ssh client which allows me to add encodings ?
 
Old 12-08-2010, 02:18 PM   #2
Latios
Member
 
Registered: Dec 2010
Distribution: Arch
Posts: 115

Rep: Reputation: 21
In Konsole (KDE) I once "hacked" an encoding. Not really. Maybe I did it the wrong way, but it worked for me

The situation, somewhat over simplified

The server sends forms with mixed language (what would count as first level and third level on a modern system), but uses plain upper case and lower case text to encode it (so for example A=A and a=À). And it also expects text to be typed the same way, but not exactly. Originally the system used some Windows 95 machines with custom built telnet client specially for this encoding, that took care of everything. Then I set up some more boxes running Linux to the network

What I did

Part 1 : Make copy of a layout file from /usr/share/X11/xkb/symbols/. Rename it indise and outside to a new locale name (for example "forms") or add a variant to an existing locale (anyway backup the file as you're going to screw it multiple times when experimenting). The file is a table matching characters to keyboard keys. Edit it and set what character you want each key to type in your application. Save and add this new layout to your keyboard layouts, so you can switch to it

Part 2 : Make copy of a font. Rename it inside and outside to a new name, change the "font family name" too. Open it with Fontforge, copy the characters you want to the new places (for example, copy À to a), save and install. Configure Konsole to use this font

Part 3 : Instruct the user to switch to "the forms language" when using this application. Any key he types is changed to the correct code by the xkb file, and that's how it's submitted to the server. Any key appearing on the screen appeaars in the font you created, and the shape of the character is what you want the user to see
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add custom encoding to KDE konsole? kofucii Linux - Newbie 1 09-18-2009 02:01 PM
gnome-terminal and character encoding problem guillaume31 Linux - Software 0 03-13-2006 09:09 AM
gnome-terminal wrong character encoding guillaume31 Linux - General 2 02-01-2006 09:04 AM
vi encoding/terminal problem ricky_ds Linux - Software 0 03-30-2005 08:20 AM
how to add mp3 encoding support on sarge? zero79 Debian 2 08-12-2004 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 09:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration