sylaxo
Posts: 4
Joined: Sun Jan 03, 2016 3:17 pm

[Solved] Accented letters

I wonder why accented letters from hs.headingText and hs.lang are rendered correctly when they are in the HEAD of the web page, and replaced by sort of black spots when they are in the config file.
And yet the charset is I think duly mentioned as :
<script type="text/javascript" src="highslide/highslide.config.js" charset="utf-8"></script>
Any idea ?
Thanks.
Last edited by sylaxo on Tue Jan 12, 2016 3:01 pm, edited 1 time in total.
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: Accented letters

I'd have to see your actual page to debug it, but I have no problem with accented characters, no matter where they're set.

Your <script> tag is not correct for HTML5 - the type attribute is not required (it defaults to javascript), and the charset attribute is deprecated. Just make sure that the calling page is set up properly for HTML5:

Code: Select all

<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Test</title>
<script src='res/highslide-full.min.js'></script>
<script src='res/highslide.config.js'></script>
</head>
(etc.)
Finally, make sure whatever text editor you're using supports UTF-8.
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: Accented letters

I just slapped together a little demo, with some nonsense accented characters for hs.lang.restoreTitle, which is the tooltip when you hover on the expanded image: (demo page removed)

While fiddling with it, I saw the problem you ran into, and it was because my text editor was writing out the highslide.config.js file in Dos/Windows format instead of UTF-8. Without UTF-8, the accented characters show up in the browser as black diamonds with question marks in them. :shock:
Last edited by MisterNeutron on Thu Jan 21, 2016 11:48 pm, edited 1 time in total.
sylaxo
Posts: 4
Joined: Sun Jan 03, 2016 3:17 pm

SOLVED - Re: Accented letters

MisterNeutron's remarks about the text editor opened the way towards the solution to the problem. The last time I had made a Highslide slideshow was over 6 months ago and I used Dreamweaver at the time. But I changed my computer and … lost Dreamweaver and now use the (free) Microsoft Expression Web 4.
Expression Web does offer UTF-8 encoding, but obviously it was a mistake to copy the French version of hs.lang from an older slideshow and paste it in an Expression Web page.
So what I have done is go to the Highslide Editor in order to copy the hs.lang file. Then I pasted it in Notepad ++ to create a new config file.
And it works. Even in Expression Web.
Thanks Mister Neutron.

Return to “Highslide JS Usage”