>> Another way is to make the form input encoded in UTF8 and just have it be 
>> wysiwyg.  I think this can be done with modern computers (Unicode input).

This has worked fine for 10+ years (as long as you can track every step from 
the browser to the DB ... in ML its not hard.
But this only solves characters (glyphs) ... it doesn’t solve font sizes, 
colors, font types, alignment, underlines, ...
Or the next level of layout say  floats , tables, divs, links , hovers,
Or the next level ... page layout, JavaScript , CSS ...

You need to define a line where you really need to support the feature or not.
Just getting Unicode right can be done in pure HTML + ML with little effort 
(sometimes some tricks with the HTML and HTTP headers to fool some browsers 
into not auto-detecting the wrong thing.
But once you start down the road of colors, fonts etc. ... it’s a new world



-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
[email protected]
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com<http://www.marklogic.com/>

From: [email protected] 
[mailto:[email protected]] On Behalf Of Christopher Hamlin
Sent: Tuesday, October 07, 2014 9:55 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Handling HTML entry of encoded characters 
for entry into XML


Another way is to make the form input encoded in UTF8 and just have it be 
wysiwyg.  I think this can be done with modern computers (Unicode input).

This is better for the user too, since they see what they are inputting.

On Tue, Oct 7, 2014 at 4:23 AM, Tim <[email protected]<mailto:[email protected]>> wrote:
Hi Folks,

I am creating an HTML entry form for inputting text that can extend beyond the 
ASCII range, so the trick is standardizing the input of entities, and of course 
what to do with the ampersand character.  There are 2 parts to this challenge:


1.       Creating the text entry UI and providing rules for inputting entities 
as well as detecting and reporting invalid entries, and

2.       Converting the inputted entities into their corresponding UTF-8 value 
for storage in MarkLogic, especially so that the exported values can be 
converted back into the appropriate entities for html display or for export 
such as to a Microsoft Word document.

It seems that I cannot have my cake and eat it too, for example if I want to 
allow the user to simply insert a title with an ampersand they could enter:
                Red & White

But if I want to allow them to enter other encoded values such as:

                &ldquo; Red & White&#8221;

Then there needs to be the expectation that entering and ampersand by itself is 
disallowed, that the former must be supplied as

                Red &amp; White

So how do folks tend to deal with this issue for each of the parts that I 
describe above?

Thanks for any help with this. It seems like a simple issue but that has a lot 
of complexity, especially when folks allow proprietary named and numbered html 
encodings with  private use area Unicode mapping. Is this the bane of UI entry 
for XML UTF-8 mapping or what? ☺

Tim M.


_______________________________________________
General mailing list
[email protected]<mailto:[email protected]>
http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to