On 01/20/2011 03:51 PM, Dr. Yves Forkl wrote:
> David wrote:
> 
>> I can't say I'm a big fan of hidden commands.  Where in the GUI would I 
>> discover this functionality?  As a user, I expect that to be a function 
>> available either through the menubar or a toolbar button on the 
>> Characters palette.
> 
> Fully agree with that. As a basic rule for GUIs, each function should be 
> available at least in a menu, without exception. Thus, insertCharByName 
> should definitely make its way into one of XXE's menus, after having existed 
> hidden for a long time in the rich list of XXE's commands (available under 
> "Tools | Execute command"). Making it available on the Characters palette 
> would be a desirable plus, of course.
> 
>> Hussein Shafie wrote:
>>> Please type "Esc n" and you'll be able to pick a character by its
>>> commonly used entity name (e.g. mdash).
> 
> David wrote:
> 
>> That said, this
>>       http://www.unicode.org/charts/charindex.html
>> is the lookup table I want to use.
> 
> Being able to insert a character via its DocBook entity name often helps, but 
> it's just not the same as finding a Unicode character through its true, 
> unique, standardized, talking, can't-do-without Unicode character name (and 
> maybe character property etc.)
> 
> I second the RFE to augment XXE with a function that accesses the Unicode 
> names database (in search or in browse mode) in order to offer character 
> entry via Unicode character names.
> 
> A possible route towards implementation could perhaps consider Java(TM) 
> libraries like those from the ICU project [1], and in particular methods like 
> getCharFromExtendedName [2].
> 
> [1] http://site.icu-project.org/
> [2] 
> http://www.docjar.com/docs/api/com/ibm/icu/lang/UCharacter.html#getCharFromExtendedName%28String%29
> 

Thank you for all this information.



> 
> To shorten waiting time a bit, I would like to contribute a little helper for 
> those users interested in lookup (and entry) of Unicode characters in XXE via 
> Unicode names.
> 
> This macro provides a Web-based search for Unicode character names (or 
> substrings/regular expression patterns matching them). The characters found 
> are displayed in your browser and can easily be copied to the clipboard and 
> inserted into XXE.
> 
> Here's how to install and use it:
> 
> 1) Put the following lines into your *.xxe configuration file (take care to 
> edit the <property> definition appropriately if already present):
> 
>   <property name="WebSearch.searchers"><![CDATA[
> UniView Character Names Search
> http://people.w3.org/rishida/scripts/uniview/?utf8=true&search=${searched}
> ]]></property>
> 
>   <command name="webSearchForUnicodeCharByName">
>     <macro>
>       <sequence>
>         <command name="prompt"
>           parameter="'UniView web service - Unicode character lookup'
>                      'Search for Unicode characters whose name matches:'"/>
>         <command name="webSearch"
>           parameter="[UniView Character Names Search] %_"/>
>       </sequence>
>     </macro>
>   </command>
> 
>   <binding>
>     <keyPressed code="F12" />
>     <command name="webSearchForUnicodeCharByName"/>
>   </binding>
> 
> 2) Restart XXE, and open any document that uses the above configuration.
> 
> 3) Pressing F12 opens a dialog and asks for the character name (or pattern) 
> to search for, then queries Richard Ishida's marvellous UniView web service 
> (Unicode character database) and displays a list of matching characters, 
> linked to further information including the character shown in a very big 
> font size. From there, it is easy to copy and insert into XXE.
> 
> (Hint: In the query URL, "utf8=true" assures that the glyphs are rendered as 
> real characters, allowing to copy and transfer them to XXE. Otherwise, they 
> are displayed as graphics, which can help you recognize the character if your 
> browser is unable to display the real character. Enabling UniView's option 
> "Use graphics" is equivalent to omitting "utf8=true".)
> 
> See the UniView Help & User Guide [3] if you want to know more about this Web 
> service. Section "You can tailor the program by..." [4] is very instructive 
> when you want to control the queries through URL parameters.
> 
> [3] http://people.w3.org/rishida/scripts/uniview/help.php
> [4] http://people.w3.org/rishida/scripts/uniview/help.php#tailor
> 

The UniView web service seems very useful and very well-thought and your
macro works fine. Thank you for your contribution.



> Have fun,
> 
>   Yves
> 
> P.S.: I wonder how to include line feeds into the message parameter of the 
> prompt command so that the message displays with a bit more vertical space.
>  

This is not possible. The message of the prompt cannot contain newline
characters.

 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to