Loading ...
Sorry, an error occurred while loading the content.

Re: NTP 6.12 and UTF-8

Expand Messages
  • Sheri
    ... AFAIK the generator part is optional. Just what I have in mine. Regards, Sheri
    Message 1 of 9 , Nov 2, 2009
    • 0 Attachment
      --- In notetab@yahoogroups.com, "corl_deluna" <corl@...> wrote:
      >
      > I assumed as much regarding the meta data, and thanks for the
      > running start. Is <meta name="generator" content="NoteTab Pro">
      > optional, or does it trigger NTP to write the utf-8 characters?

      AFAIK the generator part is optional. Just what I have in mine.

      Regards,
      Sheri
    • ebbtidalflats
      The default generator name comes from the html.tpl template: ... ^P which is loaded by
      Message 2 of 9 , Nov 3, 2009
      • 0 Attachment
        The default "generator" name comes from the "html.tpl" template:

        ...
        <META NAME="generator" CONTENT="^$GetProgName$ ^$GetProgVersion$">^P

        which is loaded by the html.clb library, when you create an html document:

        the clip "New Web page" contains:

        ^!Open ^$GetTemplatePath$HTML.tpl


        Eaither or both are easy enough to customize (work on a copy, or lose your custom changes during the next NoteTab upgrade).


        Cheers,


        Eb


        --- In notetab@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
        >
        > --- In notetab@yahoogroups.com, "corl_deluna" <corl@> wrote:
        > >
        > > I assumed as much regarding the meta data, and thanks for the
        > > running start. Is <meta name="generator" content="NoteTab Pro">
        > > optional, or does it trigger NTP to write the utf-8 characters?
        >
        > AFAIK the generator part is optional. Just what I have in mine.
        >
        > Regards,
        > Sheri
        >
      • corl_deluna
        Hi Sheri, I upgraded to 6.12. Then created a new template with this in the head: = DocTemplate CP(65001) Document-Title.htm
        Message 3 of 9 , Nov 9, 2009
        • 0 Attachment
          Hi Sheri,

          I upgraded to 6.12. Then created a new template with this in the head:

          = DocTemplate CP(65001) "Document-Title.htm"
          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
          <html lang="en">
          <head>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

          Is this all I need to do to start writing UTF-8 documents? Or do I need to do more?

          Thanks a bunch,
          Corl
        • Sheri
          ... I would suggest using a file name in the template that appends a number, to avoid conflicts if you want to have multiple new documents open at once. E.g.,
          Message 4 of 9 , Nov 10, 2009
          • 0 Attachment
            corl_deluna wrote:
            > Hi Sheri,
            >
            > I upgraded to 6.12. Then created a new template with this in the head:
            >
            > = DocTemplate CP(65001) "Document-Title.htm"
            > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
            > <html lang="en">
            > <head>
            > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            >
            > Is this all I need to do to start writing UTF-8 documents? Or do I need to do more?
            >
            > Thanks a bunch,
            > Corl
            >
            >
            >
            I would suggest using a file name in the template that appends a number,
            to avoid conflicts if you want to have multiple new documents open at
            once. E.g., "document-title%0.2d.htm". Other than that, looks ok to me.
            Any reason you can't easily test it?

            Regards,
            Sheri
          • corl_deluna
            Hi Sheri, Nice touch with the %0.2d.htm. Thank you very much. Test? When I right click on the tab of the document the UTF-8 template just made, Code Page shows
            Message 5 of 9 , Nov 10, 2009
            • 0 Attachment
              Hi Sheri,

              Nice touch with the %0.2d.htm. Thank you very much.

              Test? When I right click on the tab of the document the UTF-8 template just made, Code Page shows System Code Page (1252). Though all the browsers show the encoding as UTF-8, except Opera 10, and Safari 4 -- which didn't specify. Or do you mean something else when you say test?

              Though when I have "charset=windows-1252" specified and no CP(65001) in the template, it also shows System Code Page (1252).

              This is where my confusion comes from, it seems that no matter how I have NTP templates set, it looks like NTP is really writing in 1252. But the browser renders UTF-8 or 1252 based on the "charset" in the head of the doc. Is the browser rendering is all that really matters? I thought it would take more than that.

              Thanks,
              Corl

              Sheri wrote:

              > I would suggest using a file name in the template that appends a number,
              > to avoid conflicts if you want to have multiple new documents open at
              > once. E.g., "document-title%0.2d.htm". Other than that, looks ok to me.
              > Any reason you can't easily test it?
              >
              > Regards,
              > Sheri
            • Sheri
              ... NoteTab uses code pages internally, it is not a unicode editor. That is explained in the Help file. Usually it is desirable that the document is presented
              Message 6 of 9 , Nov 10, 2009
              • 0 Attachment
                --- In notetab@yahoogroups.com, "corl_deluna" <corl@...> wrote:
                >
                > Hi Sheri,
                >
                > Nice touch with the %0.2d.htm. Thank you very much.
                >
                > Test? When I right click on the tab of the document the UTF-8
                > template just made, Code Page shows System Code Page (1252).
                > Though all the browsers show the encoding as UTF-8, except Opera
                > 10, and Safari 4 -- which didn't specify. Or do you mean
                > something else when you say test?

                NoteTab uses code pages internally, it is not a unicode editor. That is explained in the Help file. Usually it is desirable that the document is presented using your system code page. However, you can view documents that use other code pages, and there are some sample Cyrillic and other documents that come with NoteTab you can load and examine. UTF-8 is a unicode encoding wherein ASCII characters use the same representations as ANSI code pages. They are the first 127 characters. Other characters, such as accented characters, are encoded with multiple bytes. If you want to see the accented characters, stay with the system code page (or other appropriate code page, for Cyrillic, etc.). If you want see strange looking multiple characters instead of accented letters, use raw UTF-8.

                The point for UTF-8 html pages is that despite that NoteTab decodes them for viewing and editing, the files are created and saved using UTF-8 encoding (i.e., multiple bytes for accented characters) and they load and can be viewed properly in the browser as UTF-8/Unicode.

                Regards,
                Sheri
              Your message has been successfully submitted and would be delivered to recipients shortly.