Correct file name extension for MIME 'text/enriched' file format? - emacs

Emacs offers the ability to use the MIME standard text/enriched for writing enriched text. What is the canonical file name extension for this format. Emacs seems to think it's .doc (see $EMACSDIR/24.1/etc/enriched.doc), but this could be confused with the more common Microsoft Word .doc format. Is there an alternative?
(I know it's not .rtf, which is a format different from both Microsoft's .doc and MIME's text/enriched formats)
EDIT:
It seems that .etf and .txte are some accepted extensions for this file type.

text/enriched is also known as Enriched Text Format or .etf.
http://users.starpower.net/ksimler/eudora/etf.html
http://filext.com/file-extension/ETF

Due to its intended use as an inline mail format, I don't think there is a standard file extension for it. .txte seems to be another extension that is used for it though, which does not clash with other well-known formats.

Related

How to convert a TextMate Grammar (XML flavor) to either YAML or JSON flavor

Textmate grammar (.tmLanguage files) are sometimes expressed in XML format.
I would like to convert to a more readable format (i.e. JSON or YAML) to integrate in a VS Code Syntax Highlighting Extension.
To clarify what I mean, here are a few examples:
XML format
YAML format (equivalent to the previous one)
JSON format
I could write a script in Python to do that but it would save me some time if such converter already exists.
Thanks
The TextMate Languages extension has some commands built-in for this. Screenshot from the readme:

Forcing a specific character encoding for an Excel doc in Python

I'm making Excel documents in Python, using PyExcel for now.
My specific problem is that when people using Excel open one of these documents, it opens in a weird character encoding, when I want it to decode in UTF-8.
Is there a way using PyExcel that I can give Excel a hint of what decoding I want to use? And if not PyExcel, something in Python? I'd rather not have to write a note to the users telling them to change their settings.

Own Emoji Keyboard - Listing all unicode Emojis

i want to create an own emoji-keyboard for an universal app. I need this for the reason of usage on desktop.
So i searched a lot but didnt found something helpfull. I want to show up all possible Emojis.
But i dont really want to use a file or something where i have to manage all the unicodes of the emojis - i want something like an Enumeration (like Symbols in c#)
Is there something like that? I also searched for a method of listing all keys of a font or something what would help.
You can find all official unicode characters in the latest database from unicode.org (http://www.unicode.org/Public/UCD/latest/ucd/). The file UnicodeData.txt contains all unicode characters including their names and properties.
Unfortunately, the file is not an c++ or c# enumeration but only a text file, so you have to write your own parser for this (but the file format can be easily parsed and is documented).

Displaying Chinese characters on a form from an INI File

My plugin reads the control caption text from an INI file (ANSI as UTF-8 encoding) in order to display multiple languages. Key point being it is a plugin, I have no control nor ability to change this INI file format or file type.
They are currently being read into my plugin with TINIFile.ReadString and stored as a string. I can modify this (data type, read method, etc) as needed.
The main application reads from its own application language files that are UCS-2 Little Endian encoded as a TXT file. These display fine when the language is changed, even when the Windows OS is kept in English (in other words no OS locale changes need to be made for the application to switch display languages).
My plugin's form cannot display Asian characters (Chinese, Japanese, Korean, etc). English language is fine.
I have tried various fonts, using various combinations of AnsiString, String, etc. What am I missing to be able to display Asian characters on the form? I have not found a similar question to what I'm trying to do specifically with how my language text is being read into the plugin.
If the .INI file reader does not interpret the contents of the values, and allows all values through transparently, then you need to map the strings into one with the correct locale.
There is a similar question at Delphi 2010: how do I convert a UTF8-encoded PAnsiChar to a UnicodeString? that explains how to do the conversion. You may need to extract the contents into a RawByteString to avoid the implicit conversions.

ANSI view get differed from notepad and notepad++.why?

I am writing some data as a xml file with ISO-8859 encoding.If I tried to open the file in notepad++.I can able to see the 'Â' character which is already present in the file.But if I tried to open the file in notepad the character 'Â' gets removed.Though I am very new to Encoding,I don't know why.Please suggest some reason for this.
This file is also get opened in browser with the 'Â' character.
Thanks in Advance
Windows notepad is a very basic editor, and has quite a number of limitations, one of which is the support it has for different encoding formats other than ANSI, Unicode and UTF-8. When editing files in other formats, it can give unreliable/unexpected results.
If you are handling files in different encoding formats, you are better off avoiding notepad altogether and using an editor (such as Notepad++) which has better support for multiple encoding formats.
For more information on how Windows notepad "guesses" at the correct format to use (with varying levels of success) see here
Bear in mind that other editors often use similar techniques to "guess" the format of a file, so it is often a good idea to check/set the encoding for a file manually (where possible) for less common encoding formats to ensure you get the correct results every time.