HTML Editor - converting "special characters" into entities

Hi everyone,
I'm currently in the middle of formatting my wife's novel into 'clean' html so I can use Calibre to create a well formatted epub/mobi/etc.
I've read that TextMate on Mac includes a function to "Convert Selection to Entities excluding Tags".  In other words it will replace all special characters (ellipses, copyright sign, etc) with the html entities.
I'm currently using Kate and I can't seem to find anything similar.  Is anyone aware of any linux editors with the same function?
Thanks for the help!

ctarwater wrote:Encoding is already UTF-8 but I'm trying to make these docs as "universal" as possible and I've read that little things like replacing quotation marks and other symbols with their html entities is a good step in that direction.
In situations with multiple encodings this might be the case, but the XML spec requires UTF‐8 support at minimum and defaults to it when the encoding is not declared. All XML parsers can deal with UTF‐8.
In fact, replacing UTF‐8 characters with entities is less portable in XML. This is because the available entities are defined by the doctype, and XML only supports five by default (<, >, ", &, and '). Things like … are defined in the HTML and XHTML doctypes, but not in other dialects of XML. This used to bite RSS pretty hard (probably still does), because people assumed the entities were available everywhere when they’re really not. EPUB and Mobi are based on XHTML, but other formats might use other XML dialects.

Similar Messages

  • To convert special characters to English characters.

    Is there any functional module to convert special characters(Latin) to English characters?

    Hi Meera,
         Welcome To SDN!!
    try using the function module 'SCP_REPLACE_STRANGE_CHARS'.
    Give the variable with special characters in intext.
    Regards
    Kiran Sure

  • Converting String Characters into Regular Expression Automatically?

    Hi guys.... is there any program or sample coding which is available to convert string characters into regular expression automatically when the program is run?
    Example:
    String Character Input: fnffffffffffnnnnnnnnnffffffnnfnnnnnnnnnfnnfnfnfffnfnfnfnfnfnnnnd
    When the program runs, it automatically convert into this :
    Regular Expression Output: f*d

    hey guys.... i am sorry for not providing all the information that you guys need as i was rushing off to urgent meeting... for my string characters i only have a to n.. all these characters are collected from sensors and stored inside database... from many demos i have done... i found out that every demo has different strings of characters collected and these string of characters will not match with the regular expressions that i had created due to several unwanted inputs and stuff... i have a lot of different types of plan activities and therefore a lot of regular expressions.... if i put [a-z|0-9]*... it will capture all characters but in the same time it will be showing 1 plan only.... therefore, i am finding ways to get the strings i collected and let it form into regular expression by themselves in the program so that it will appear as different plans as output with comparing with the regular expression that i had created.... is there any way to do so?
    please post again if there is any questions u are still not familiar with... thank you...

  • Special characters into datagrid through the use of buttons

    Hi!
    I have a datagrid for word input, I'm trying to create a "special characters" panel, kind of like google's new "virtual keyboard" thing on google.com, so that the user can enter data into the datagrid cells using characters that aren't on their keyboards.
    I manage to do this just fine, using the solution below. I know this is probably not the best/most effective way to do this, so any suggestions for making the code better will be appreciated. I only started using Flex a month ago.
    grid.addEventListener(DataGridEvent.ITEM_EDIT_BEGIN, selectColumn)
    function selectColumn(event:DataGridEvent):void
    var selectedColumn:DataGridColumn = grid.columns[event.columnIndex];
    selCol = selectedColumn.dataField;
    //The function for adding a special character to the selected datagrid column by clicking a button:
    //(inputWordArray is the dataprovider for the grid called "grid" )
    protected function clickSomeButton(event:MouseEvent):void
    var colIndex:int = new int;
    if (selCol == "from"){
    inputWordArray[grid.selectedIndex].from = inputWordArray[grid.selectedIndex].from + "æ";
    colIndex = 0;
    else if (selCol == "to"){
    colIndex = 1;
    inputWordArray[grid.selectedIndex].to = inputWordArray[grid.selectedIndex].to + "æ";
    inputWordArray.refresh();
    grid.dispatchEvent(new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, false, colIndex, null, grid.selectedIndex));
    The problem is that this only adds a letter at the end of the selected item's value, not at a specific position within the word specified by the position of the cursor. This is what I need to achieve. I have no idea even what to search for, if anyone could please give me a hint that'd be great.

    You will probably need to capture the editor's selectionBeginIndex and
    selectionEndIndex

  • How to convert special characters like #, &, etc occuring in the input string

    Hi,
              I am using method 'Get' to submit a form . When ever there is any
              special character like '#' in my input For example "033#Test", nothing
              gets posted beyond 033.
              Can any one please let me know how do I overcome this problem.
              Thanks in advance.
              Regards,
              Moin
              

    Moinuddin:
              It seems possible your browser may be confused by the fact that 033 is
              the octal representation for an ESCape character (Hex 1B). Try dropping
              the leading zero. In addition, it is usually better to represent special
              characters like the hash mark "#" using HTML character entities instead
              of literals, i.e. # = hash mark
              Regards,
              Jim Brown
              Moinuddin Ahmed wrote:
              >
              > Hi,
              > I am using method 'Get' to submit a form . When ever there is any
              > special character like '#' in my input For example "033#Test", nothing
              > gets posted beyond 033.
              >
              > Can any one please let me know how do I overcome this problem.
              >
              > Thanks in advance.
              > Regards,
              > Moin
              Jim Brown
              Developer Relations Engineer
              BEA Support
              

  • How to convert special characters in ABAP to XML?

    Hi All.
    We have a scenario where from XI (exchange Infrastructure), a BAPI is called which returns an XML. From that XML, a PDF is generated.
    Now, if the XML contains any special characters, it will fail.
    So if any CHinese char or >, # etc signs are there, it fails.
    Can you please tell me how to convert my string in ABAP to a proper XML?
    I am new to it and I was trying the following code
    DATA: today TYPE string,
          result TYPE string.
    today = 'This is testing'.
    CALL TRANSFORMATION ID
         SOURCE today = today
         RESULT XML result.
    IF sy-subrc = 0.
      WRITE result.
    ENDIF.
    But it does not return me anything.
    Thanks in adv.

    hi
    good
    go through these links,hope these would help you to solve your problem
    http://www.sap-press.de/download/dateien/792/sappress_abapreference_2edition.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d
    thanks
    mrutyun^

  • How to export special characters into an XML file?

    Dear experts,
    We read files from our customers and save data into our customized table without any character changed, including some address fields. In those address fields, some special characters (not in our code page) are also kept. When we want to write these address fields into an XML file or flat file, the special charcters become "##" or not readable, can anyone help us to solve this issue?
    Question1: How to write special code to an external file?
    Question2: how to use 'CALL TRANSFORMATION' from an internal table to an XML file?
    Your answer is highly appreciated!
    Joanne

    Hi Joanne.
    Please check the below link.
    CALL TRANSFORMATION
    Before that u have to create one transformation program in STRANS tcode for using it in call transformation statement.
    Hope it will be useful.
    Regards,
    Lakshman

  • Auto convert special characters

    Good day all and thanx for your help.
    CS3 & trying out CS5.
    A couple of the sites I do, are written in Afrikaans, ons of the 11 official languages in South Africa.
    Afrikaans makes use of characters such as ê, ë, ô, ü, é, ö and so on. I normally forget to change it in code view and make use of &... It then displays as funny characters in browser. Is there a way I can learn/tell DW to auto change my special characters or do you perhaps have a good solution or tip for me.
    Thank you very much.
    Regards,
    Deon

    Hi Deon,
    that happens to me very often too. So I too thought it would be nice to change the special characters automatically. All I've found at that time was a payment program (in those days for CS3). It's still here after all:
    http://www.experts-exchange.com/Web_Development/Software/Macromedia_Dreamweaver/Q_22706485 .html
    Meanwhile, I'll do it in another way. When I finished one of my sides, I use the "Find and Replace"-function of DW. I start searching one of the special characters and after changing them (if necessary), I only replace one character and can start a new action. Look here for example (from my German DW where we have the same problems in our language):
    The general way to insert the special characters you know, I suppose. If not, here you will find a nice tutorial:
    http://www.recipester.org/Recipe:Insert_special_characters_in_Dreamweaver_27537484
    or
    http://help.adobe.com/en_US/dreamweaver/cs/using/WSc78c5058ca073340dcda9110b1f693f21-7ccca .html
    Hans-G.

  • How to insert & # special characters into oracle table?

    I have a text value which contains special characters such as & and #.
    After I pass from one page to another,
    TEST& becomes "TEST&"
    I put " " on the above test, otherwise amp; will be truncated by OTN).
    TEST# becomes TEST (# is truncated).
    Actually the value is saved in table like this: "TEST&"
    How to solve this problem?
    How to insert & into table without &
    Thank you.
    Edited by: user628655 on Jul 27, 2009 9:47 AM
    Edited by: user628655 on Jul 27, 2009 9:49 AM
    Edited by: user628655 on Jul 27, 2009 10:39 AM

    Avoid doing that through a link. If this is a page item then submit the page and redirect to the target page using a branching. On the target page, create a computation to compute the target item using the original page item as the source. If you are talking about a report, use the id to pass through the link and fetch the text column in an on load computation.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------

  • How to add special characters into numbers?

    Hi, I wonder how can I add special characters like the one in the "Edit" menu for the Mac versions? Thanks.

    It all depends what exactly you are talking about, so if you tell us, someone can help you. Some can be made from the keyboard, others you would need to copy/paste from an app like Unicode Map.

  • Parsing BLOB (CSV file with special characters) into table

    Hello everyone,
    In my application, user uploads a CSV file (it is stored as BLOB), which is later read and parsed into table. The parsing engine is shown bellow...
    The problem is, that it won't read national characters as Ö, Ü etc., they simply dissapear.
    Is there any CSV parser that supports national characters? Or, said in other words - is it possible to read BLOB by characters (where characters can be Ö, Ü etc.)?
    Regards,
    Adam
      |
      | helper function for csv parsing
      |
      +-----------------------------------------------*/
      FUNCTION hex_to_decimal(p_hex_str in varchar2) return number
      --this function is based on one by Connor McDonald
        --http://www.jlcomp.demon.co.uk/faq/base_convert.html
       is
        v_dec number;
        v_hex varchar2(16) := '0123456789ABCDEF';
      begin
        v_dec := 0;
        for indx in 1 .. length(p_hex_str) loop
          v_dec := v_dec * 16 + instr(v_hex, upper(substr(p_hex_str, indx, 1))) - 1;
        end loop;
        return v_dec;
      end hex_to_decimal;
      |
      | csv parsing
      |
      +-----------------------------------------------*/
      FUNCTION parse_csv_to_imp_table(in_import_id in number) RETURN boolean IS
        PRAGMA autonomous_transaction;
        v_blob_data   BLOB;
        n_blob_len    NUMBER;
        v_entity_name VARCHAR2(100);
        n_skip_rows   INTEGER;
        n_columns     INTEGER;
        n_col         INTEGER := 0;
        n_position    NUMBER;
        v_raw_chunk   RAW(10000);
        v_char        CHAR(1);
        c_chunk_len   number := 1;
        v_line        VARCHAR2(32767) := NULL;
        n_rows        number := 0;
        n_temp        number;
      BEGIN
        -- shortened
        n_blob_len := dbms_lob.getlength(v_blob_data);
        n_position := 1;
        -- Read and convert binary to char
        WHILE (n_position <= n_blob_len) LOOP
          v_raw_chunk := dbms_lob.substr(v_blob_data, c_chunk_len, n_position);
          v_char      := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
          n_temp      := ascii(v_char);
          n_position  := n_position + c_chunk_len;
          -- When a whole line is retrieved
          IF v_char = CHR(10) THEN
            n_rows := n_rows + 1;
            if n_rows > n_skip_rows then
              -- Shortened
              -- Perform some action with the line (store into table etc.)
            end if;
            -- Clear out
            v_line := NULL;
            n_col := 0;
          ELSIF v_char != chr(10) and v_char != chr(13) THEN
            v_line := v_line || v_char;
            if v_char = ';' then
              n_col := n_col+1;
            end if;
          END IF;
        END LOOP;
        COMMIT;
        return true;
      EXCEPTION
         -- some exception handling
      END;

    Uploading CSV files into LOB columns and then reading them in PL/SQL: [It&#146;s|http://forums.oracle.com/forums/thread.jspa?messageID=3454184&#3454184] Re: Reading a Blob (CSV file) and displaying the contents Re: Associative Array and Blob Number of rows in a clob doncha know.
    Anyway, it woudl help if you gave us some basic information: database version and NLS settings would seem particularly relevant here.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Report Query - Download data - converts special characters

    When I'm doing a select from a table which has a "<" or ">" sign it is being changed to &lt; or &gt; when I view the XML data that is being downloaded. Is there any way to prevent it from doing this?

    What I'm finding is that when master detail data is dumped in XML it is being dumped as individual rows.
    <DOC>
    <ID>12341</ID>
    <RC>23456</RC>
    </DOC>
    <DOC>
    <ID>12342</ID>
    <RC>34567</RC>
    </DOC>
    <DOC>
    <ID>12343</ID>
    <RC>45678</RC>
    </DOC>
    What I'm trying to achieve is this ...
    <DOC>
    <ID>12341</ID>
    <RCROW>
    <RC>23456</RC>
    <RC>34567</RC>
    <RC>45678</RC>
    </RCROW>
    </DOC>
    This is how one should expect the data to look... not as my first example. Can I do this with plsql... most definitely. However, the report query tool wants a select statement. You can add queries but it will simply output the data as a single row regardless of how many queries you create. Furthermore I thought I might try to introduce subnodes by encapsulating the data with <> but unfortunately any special data will get converted to html code. So when I read it with text viewer software I can see these replaced with &lt; and &gt; Within the report query tool you can't create a select which will format the data (as per my second example). I'm trying to use reporting software which will expect the data as per my second example so that it will appear grouped and sorted properly but it won't work if the rows are being treated as individual lines as in my first example. I'm not sure why Oracle would not allow you to sort and group it this way since any XML data I've seen, seems to be grouped as per my second example and not as they have implemented it. I have no idea as to how to create this format to the data using report queries given the data will get converted to HTML.

  • How do I convert inputted characters into Uppercase in JDeveloper 11.1.2?

    Hi Everyone:
    Back in 2007 when we were trying to figure this out, Steven Davelaar gave me the solution to use the Custom Properties as found here in this post.....
    Can I convert data inputted to Uppercase by using a EO/VO domain?
    It has been working for us excellently. I have been playing around in JDeveloper 11.1.2 and trying to implement the same thing in our reusable business components .jar file, but they have changed the Custom Properties so much, I am not sure what to do. I cannot seem to type in "Uppercase" in the Property section, and then "true" in the value section with the add dialogue box that is now supplied. I appears that the Custom Properties code is going into the ModelBundle file as opposed to the .xml file.
    Is there a way to do this in JDev 11.1.2? Yes, I know you could tell me to post this to the JDev forum, but in the last 2 weeks I have had 2 carefully researched threads in that forum and have gotten NO useful replies even after bringing them to the front of the forum several times. Frustrating waste of my time.
    I am hoping since Steven knew how to do this before, that he will possibly know how to do it again.
    Do I have to manually edit the XML file? Is this even possible in 11.1.2?
    Thank you so much in advance.
    Mary
    UofW

    Hi All:
    I have figured out my problem. When in the new 11.1.2 Custom Properties tab of an attribute, an individual must click on the arrow next to the "+" sign and choose "Non-translatable Property". This then fills in the Property column with the word "Property" and the Value column with the word "Value".
    The trick is to double click on the word Property which makes it editable and add "Uppercase", and double click on the word Value replacing it with "true" in order to translate to uppercase as described in the above mentioned post.
    I hope that is helpful to someone.
    Mary
    UofW

  • Abap TO CONVERT SPECIAL CHARACTERS TO SPACE

    I have a field in BI "zpustreg" which has values with - and # which is not allowing me to load the data to cube so I am writing this code in transformation to convert any special character to space. but it is having error if you can help me fix the code below would really appreciate it
    <b>Abap Code to Load ZPUSTREG</b>
      METHOD compute_ZPUSTREG.
      IMPORTING
        request     type rsrequest
        datapackid  type rsdatapid
        SOURCE_FIELDS-/BIC/ZPUSTREG TYPE /BIC/OIZCUSTREG
       EXPORTING
         RESULT type tys_TG_1-/BIC/ZPUSTREG
        DATA:
          MONITOR_REC    TYPE rsmonitor.
    $$ begin of routine - insert your code only below this line        -
    ... "insert your code here
    *DATA:Monitor_REC TYPE rsmonitor.
    DATA:L_D_OFFSET LIKE sy-index.
    CONSTANTS:c_allowed(60) TYPE c.
    Value `ABCDEFGHIJKLMNOPQRSTUVWXYZ!"%&'()*+,-/:;<=>?_0123456789_’.
    RESULT = SOURCE_FIELDS-/BIC/ZPUSTREG
    TRANSLATE RESULT TO UPPER CASE
    DO 60 TIMES.
    L_d_offset = sy-index – 1.
    IF RESULT+1_offset(1) CO c_allowed.
    Else.
    RESULT+1_d_offset(1) = ` ’.
    ENDIF.
    ENDDO.
    ENDMETHOD.
    <b>
    E:Statement "VALUE" is not defined. Check your spelling. spelling.
    E:Unable to interpret "C". Possible causes of error: Incorrect spelling</b>
    Thanks
    Soniya

    Hello Soniya
    There is simply a '.' at the wrong place:
    CONSTANTS:c_allowed(60) TYPE c.  "<- wrong, remove
    Value `ABCDEFGHIJKLMNOPQRSTUVWXYZ!"%&'()*+,-/:;<=>?_0123456789_’.
    CONSTANTS:c_allowed(60) TYPE c
    Value `ABCDEFGHIJKLMNOPQRSTUVWXYZ!"%&'()*+,-/:;<=>?_0123456789_’.
    That's it.
    Regards
      Uwe

  • Creating xml and converting special characters

    I am trying to creating an xml representation of some data. I have created various methods for creating the various parts of the structure.
    But is there an easy way to transform invalid xml characters to the xml representations (such as converting to a particular charset) e.g & -> amp;
    public class XMLTagDisplayFormatter extends AbstractTagDisplayFormatter
        private static XMLTagDisplayFormatter formatter;
        protected static final String xmlOpenStart = "<";
        protected static final String xmlOpenEnd = ">";
        protected static final String xmlCloseStart = "</";
        protected static final String xmlCloseEnd = ">";
        protected static final String xmlSingleTagClose = " />";
        protected static final String xmlSingleDataTagClose = "]] />";
        /** Return xml open tag round a string e.g <tag> */
        public static String xmlOpen(String xmlName)
            return xmlOpenStart + xmlName + xmlOpenEnd;
        public static String xmlOpenHeading(String name,String data)
            return(xmlOpen(name+" id=\""+data+"\""));
        /** Return xml close tag around a string e.g </tag> */
        public static String xmlClose(String xmlName)
            return xmlCloseStart + xmlName + xmlCloseEnd;
        public static String xmlSingleTag(String data)
           return xmlOpenStart + data + xmlSingleTagClose;
       public static String xmlFullTag(String xmlName,String data)
           return     xmlOpen(xmlName)
                   +  data
                   +  xmlClose(xmlName);
        StringBuffer sb = new StringBuffer();
        public void   openHeadingElement(String type,String value)
             if(value.equals(""))
                 sb.append(xmlOpen(type));
             else
                 sb.append(xmlOpenHeading(type,replaceXMLCharacters(value)));
        public void   openHeadingElement(String type,boolean value)
          openHeadingElement(type,String.valueOf(value));
       public void   openHeadingElement(String type,int value)
            openHeadingElement(type,String.valueOf(value));
        public void   closeHeadingElement(String type)
            sb.append(xmlClose(type));
        public void addElement(String type, String value)
            sb.append(xmlFullTag(type,replaceXMLCharacters(value)));
        public void addElement(String type, int value)
            addElement(type,String.valueOf(value));
        public void addElement(String type, boolean value)
            addElement(type,String.valueOf(value));
        public String toString()
            return sb.toString();
        public AbstractTagDisplayFormatter getInstanceOf()
            if (formatter == null)
                formatter = new XMLTagDisplayFormatter();
            return formatter;
    }

    Thanks,
    Ive written this method which seems to work for me although Im only using it for debugging.
    public static String xmlCData(String xmlData)
            char tempChar;
            StringBuffer replacedString = new StringBuffer();
            for(int i=0;i<xmlData.length();i++)
               tempChar = xmlData.charAt(i);
               if(
                   (Character.isLetterOrDigit(tempChar)==true)
                   ||
                   (Character.isSpaceChar(tempChar)==true)
                   replacedString.append(tempChar);
               else
                   replacedString.append("#x"+Character.digit(tempChar,16));
             return xmlCDataTagOpen + replacedString + xmlCDataTagClose;
        }

Maybe you are looking for