Jump to content
RICH_WEB

UTF-8 OR ANSI

Recommended Posts

Hi,

Sorry about my total lack of technical knowledge.

 

What do you save .css files as? Is it UTF-8 or ANSI?

 

Also in the raspbian distro I'm using it has the option of 'Current Locale(UTF-8)' and 'UTF-8' but not for 'ANSI'. The other options are ISO-8859-1, ISO-8859-15, CP1252. And next to the options is another box with CR+LF and you can choose just LF or just CR.

 

I'm trying to use the raspberry pi as a webserver so I can see what my website designs look like on my Apple Ipod.

 

1. It shows up on the ipod but the css doesn't seem to be linking.

 

2. I can open it in the Dillo web browser on the raspbian distro and it is working fine.

 

3. If I type the IP address of my Raspberry PI into my Apple Ipod using the safari browser or my Windows10 using the Edge browser it just loads the basic HTML without any CSS.

 

4. It works if I just run the files from my local account on Windows, i.e. the same files I have on the raspberry pi but loading them straight from my windows machine and not going through the raspberry pi.

 

I have put everything in the same folder: /var/www

 

I have put a link in the header part of the HTML file for the CSS: <link rel="stylesheet" href="/var/www/smallest.css">

Share this post


Link to post
Share on other sites

Always utf, saving as ansii will cause readability problems by browser, not just css but for htm, js files as well.Many people have been caught out using notepad and not realising they needed to change encoding dropdown to utf.

Share this post


Link to post
Share on other sites

Thanks for the reply.

 

I've saved both HTML and CSS files with UTF-8 and it still doesn't work, it still shows only the HTML when I use my Ipod or Windows.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×