Classical Numismatics Discussion
  Welcome Guest. Please login or register. STORE WIDE SALE!!! 10% OFF EVERYTHING!!! WE ARE OPEN AND SHIPPING!!! We Are Working From Home, Social Distancing, Wearing Masks, And Sanitizing To Pack Orders!!! Please Call Us If You Have Questions 252-646-1958 Welcome Guest. Please login or register. STORE WIDE SALE!!! 10% OFF EVERYTHING!!! WE ARE OPEN AND SHIPPING!!! We Are Working From Home, Social Distancing, Wearing Masks, And Sanitizing To Pack Orders!!! Please Call Us If You Have Questions 252-646-1958


FORVM`s Classical Numismatics Discussion Board  |  Numismatic and History Discussions  |  Ancient Coin Webmasters (Moderator: Sorin Teodor)  |  Topic: Editing Metatags with Japanese Text Without Damaging Pages 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Editing Metatags with Japanese Text Without Damaging Pages  (Read 1267 times)
Joe Sermarini
Owner, President
FORVM STAFF
Caesar
*****
Offline Offline

Posts: 10272


All Coins Guaranteed for Eternity.


WWW
« on: March 27, 2020, 02:10:43 pm »

I need to add the viewport tag on a hosted website (a tag required for mobile usability).  If I try to add the tag with ordinary English language (Latin alphabet) editor (I have tried a few), the Japanese characters are removed and replaced with garbage. Does anyone know how I can add the metatag without ruining the pages?
Logged

Joseph Sermarini
Owner, President
FORVM ANCIENT COINS
xanthos
Praetorian
**
Offline Offline

Posts: 35


« Reply #1 on: March 27, 2020, 02:57:00 pm »

The page has Japanese letters that break when you add the viewport tag with your editor? Sounds like your editor is messing up the encoding of the page. What editors have you tried? And what page is it?
Logged
Joe Sermarini
Owner, President
FORVM STAFF
Caesar
*****
Offline Offline

Posts: 10272


All Coins Guaranteed for Eternity.


WWW
« Reply #2 on: March 27, 2020, 06:12:08 pm »

I have used simple text editors, like notepad.  Yes, it is messing up the encoding of Chinese characters (the same problem also applies to Greek and other alphabets).  The pages are here:

https://www.forumancientcoins.com/augustus/index.html
Logged

Joseph Sermarini
Owner, President
FORVM ANCIENT COINS
xanthos
Praetorian
**
Offline Offline

Posts: 35


« Reply #3 on: March 28, 2020, 01:42:15 am »

If you're looking at the HTML code of the page, you will see that it uses Shift_JIS as encoding. Notepad only supports ANSI and some UTF encodings. So you will either need an editor that supports this Japanese encoding or you will have to convert the file from Shift_JIS to UTF-8 (and don't forget to change the content type meta tag).
Logged
Joe Sermarini
Owner, President
FORVM STAFF
Caesar
*****
Offline Offline

Posts: 10272


All Coins Guaranteed for Eternity.


WWW
« Reply #4 on: March 28, 2020, 04:59:16 am »

Does anyone know a free editor that uses Shift_JIS encoding and works in English?
Logged

Joseph Sermarini
Owner, President
FORVM ANCIENT COINS
PeterD
Procurator Caesaris
Caesar
****
Offline Offline

Posts: 1462


omnium curiositatum explorator


WWW
« Reply #5 on: April 08, 2020, 07:52:01 am »

Notepad is absolutely fine for editing HTML pages. It uses plain text only, which is all that is needed. No need to insert Japanese or any other characters. Just leave the original tags as they were.
Logged

Peter, London

Historia: A collection of coins with their historical context https://www.forumancientcoins.com/historia
Joe Sermarini
Owner, President
FORVM STAFF
Caesar
*****
Offline Offline

Posts: 10272


All Coins Guaranteed for Eternity.


WWW
« Reply #6 on: April 08, 2020, 09:50:59 am »

Thanks, but you have misunderstood the problem.  I am attempting to add a metatag to a page that has Japanese content. I don't want to insert Japanese, the page is already in Japanese. Notepad does not recognize the Japanese characters and turns them into scrambled nothing.  Notepad destroys the content of the page.
Logged

Joseph Sermarini
Owner, President
FORVM ANCIENT COINS
PeterD
Procurator Caesaris
Caesar
****
Offline Offline

Posts: 1462


omnium curiositatum explorator


WWW
« Reply #7 on: April 08, 2020, 11:32:25 am »

What I don't understand, is why you want a text editor that uses 'Shift_JIS' coding. An HTML page is just plain text. You can open it in Notepad. There won't be any Japanese there, just tags. So add the line you want and save it (still as .html). Open in a browser and it should display as before.
Logged

Peter, London

Historia: A collection of coins with their historical context https://www.forumancientcoins.com/historia
Joe Sermarini
Owner, President
FORVM STAFF
Caesar
*****
Offline Offline

Posts: 10272


All Coins Guaranteed for Eternity.


WWW
« Reply #8 on: April 08, 2020, 11:51:14 am »

No, notepad does not work. The page below was Japanese text. After changing the metatag IN NOTEPAD and saving, it looks like this. By the way, it will do the same to Greek, Russian or any other text that is not in the Latin alphabet.


* Capture.JPG (104.94 KB, 1063x415 - viewed 6 times.)
Logged

Joseph Sermarini
Owner, President
FORVM ANCIENT COINS
PeterD
Procurator Caesaris
Caesar
****
Offline Offline

Posts: 1462


omnium curiositatum explorator


WWW
« Reply #9 on: April 08, 2020, 04:27:28 pm »

Yes, I can see it doesn't work. When you try out the edited HTML page in a browser, is the page 'in situ'? -in other words, not a copy on your HD. Could be  there is separate font information that cannot be accessed.

You say that greek is similarly affected. However, many of my Historia pages have greek on them and they all work (on computer or smartphone) even though you have added the 'Viewport' line to them. So the Greek you are looking at and the Japanese probably do access separate font information or the font native to viewing device.

Hope that helps.
Logged

Peter, London

Historia: A collection of coins with their historical context https://www.forumancientcoins.com/historia
Meepzorp
Procurator Caesaris
Caesar
****
Offline Offline

Posts: 3892



WWW
« Reply #10 on: April 08, 2020, 10:45:59 pm »

You say that greek is similarly affected. However, many of my Historia pages have greek on them and they all work (on computer or smartphone) even though you have added the 'Viewport' line to them. So the Greek you are looking at and the Japanese probably do access separate font information or the font native to viewing device.

Hi PD,

I am not a coding expert anymore. I used to be when I was younger (many decades ago). So, I don't know if this post will be useful to you and Joe.

Many of my website pages also have Greek letters. They display perfectly fine since Joe added that extra line of code to my pages.

Why are my pages and your pages displaying Greek letters perfectly fine, but Joe is having problems displaying Japanese and Greek letters in his pages that he mentioned at the beginning of this thread?

Maybe it has something to do with the line of code at the beginning of all of my website pages that contains "UFT-8"? I don't know. I think one of the earlier posters in this thread was alluding to that.

Again, I have been "out of the loop" regarding coding for so many years (several decades actually) that I am not sure.

Meepzorp
Logged

PeterD
Procurator Caesaris
Caesar
****
Offline Offline

Posts: 1462


omnium curiositatum explorator


WWW
« Reply #11 on: April 09, 2020, 05:15:33 am »

Hi Meepzorp

Your pages and mine use individual greek characters in the form Α That works fine for a small number of letters. I don't know the details but I guessing that if you need to put in a large amount of text and define a specific font (particularly for Japanese) you need to do something else (UTF-8, UTF-16?). I think that that would require a declaration as to where that font could be found. However, that shouldn't be of any concern. What I am saying is that if a page was, say, copied onto an office computer, the path to the font would then be wrong and opening the page would show garbled text. However, if the page was edited as required and then copied back to the server, it should work correctly.

PD
Logged

Peter, London

Historia: A collection of coins with their historical context https://www.forumancientcoins.com/historia
Joe Sermarini
Owner, President
FORVM STAFF
Caesar
*****
Offline Offline

Posts: 10272


All Coins Guaranteed for Eternity.


WWW
« Reply #12 on: April 09, 2020, 06:28:33 am »

As xanthos said above, "Notepad only supports ANSI and some UTF encodings." When opening the page, Notepad warns that it is incompatible and the page is scrambled. If it is saved, it stays scrambled. It has nothing to do with native fonts or where the file is stored. I need an editor that supports this Japanese encoding.
Logged

Joseph Sermarini
Owner, President
FORVM ANCIENT COINS
PeterD
Procurator Caesaris
Caesar
****
Offline Offline

Posts: 1462


omnium curiositatum explorator


WWW
« Reply #13 on: April 09, 2020, 06:58:54 am »

I must say that I am mystified by what you are trying to do. An .html file is a simple text file. Whatever word editor you use, any foreign language text will just appear as disparate characters. Nothing gets changed unless you change it. The foreign language only appears when you run the file in a browser.

Perhaps you can give me the address of one of these Japanese or Greek pages and I can try it myself.
Logged

Peter, London

Historia: A collection of coins with their historical context https://www.forumancientcoins.com/historia
Joe Sermarini
Owner, President
FORVM STAFF
Caesar
*****
Offline Offline

Posts: 10272


All Coins Guaranteed for Eternity.


WWW
« Reply #14 on: April 09, 2020, 08:12:36 am »

Peter, I am sorry but you are wrong.  I tried everything that you have suggested before I started this thread.

The Greek pages, I already replaced the incompatible code with compatible code. The incompatible Greek code was changed to question marks by notepad.

Here is the Japanese website: https://www.forumancientcoins.com/augustus/index.html. Right click and see the source. It is not simple text.
Logged

Joseph Sermarini
Owner, President
FORVM ANCIENT COINS
PeterD
Procurator Caesaris
Caesar
****
Offline Offline

Posts: 1462


omnium curiositatum explorator


WWW
« Reply #15 on: April 09, 2020, 09:55:59 am »

Now I understand the problem - if not the answer.

I did try editing the web page in Notepad. Viewed in Notepad, the Japanese was garbage as you would expect. However when I tried to view it in a browser, the Japanese script all seemed to be there. However, the page wasn't formatted, and all the tags were displayed. However the unedited page reacted in the same way.

I am now waving the white flag!
Logged

Peter, London

Historia: A collection of coins with their historical context https://www.forumancientcoins.com/historia
helvetica
Tribuna Plebis Perpetua
Procurator Monetae
Caesar
*****
Offline Offline

Posts: 1534


Helvetia Libera Deo Gratia


WWW
« Reply #16 on: June 08, 2020, 05:20:57 pm »

Did you get this sorted out, Joe ? When I use the link to the /augustus/ page it seems to have been removed (404 Not Found, or Internal Error).
I could see whether NoteTab Pro (NOT Notepad!) can do what you want.
Logged
Joe Sermarini
Owner, President
FORVM STAFF
Caesar
*****
Offline Offline

Posts: 10272


All Coins Guaranteed for Eternity.


WWW
« Reply #17 on: June 09, 2020, 08:38:03 am »

No, I haven't sorted it out yet. I have temporarily dropped the project. Too many other things fell behind. 
Logged

Joseph Sermarini
Owner, President
FORVM ANCIENT COINS
Pages: [1] Go Up Print 
FORVM`s Classical Numismatics Discussion Board  |  Numismatic and History Discussions  |  Ancient Coin Webmasters (Moderator: Sorin Teodor)  |  Topic: Editing Metatags with Japanese Text Without Damaging Pages « previous next »
Jump to:  

Recent Price Reductions in Forum's Shop


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 1.276 seconds with 57 queries.
All coins are guaranteed for eternity
zoom.asp