News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Date not showed correctly on posts

Started by 3nd3r, March 17, 2008, 01:05:00 PM

Previous topic - Next topic

3nd3r

Hello.
I have an issue with how the date is shown in my web. The abbreviation days with an written accent like 'Miércoles' and 'Sábado' are noy shown properly: It shows abreviated like 'Mi' (instead of correct 'Mié') and 'Sb' (instead of correct 'Sáb')

I'm using SMF 1.1.4 and TP 0.9.8. My web is http://www.pajareo.com

In my index.spanish.php:
$txt['lang_locale'] = 'spanish';
$txt['lang_dictionary'] = 'es';
$txt['lang_spelling'] = '';

// Character set and right to left?
$txt['lang_character_set'] = 'ISO-8859-1';
$txt['lang_rtl'] = false;

$txt['days'] = array('Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado');
$txt['days_short'] = array('Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb');


in PHPMyAdmin:

    * Versión del servidor: 4.1.22-standard-log
    * Versión del protocolo: 10
    * Servidor: Localhost via UNIX socket

    * Juegos de caracteres de MySQL: UTF-8 Unicode (utf8)
    * Cotejamiento de las conexiones MySQL: utf8_unicode_ci


The source code looks like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script language="JavaScript" type="text/javascript" src="http://www.pajareo.com/Themes/default/script.js?rc3"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "http://www.pajareo.com/Themes/simplicity11_tp";
var smf_images_url = "http://www.pajareo.com/Themes/simplicity11_tp/images";
var smf_scripturl = "http://www.pajareo.com/index.php";
var smf_iso_case_folding = false;
var smf_charset = "UTF-8";
// ]]></script>


On the SQL variables table:
Variables y parámetros del servidor Variable Valor de la sesión / Valor global
character set client utf8
(Valor global) latin1
character set connection utf8
(Valor global) latin1
character set database latin1
character set results utf8
(Valor global) latin1
character set server latin1
character set system utf8
character sets dir /usr/share/mysql/charsets/
collation connection utf8_unicode_ci
(Valor global) latin1_swedish_ci
collation database latin1_swedish_ci
collation server latin1_swedish_ci


And also you can see http://www.pajareo.com/phpinfo.php to get more details...

Any idea? (sorry for my english)

metallica48423

Hi, :)

It looks like you're using UTF-8, and not standard latin1 encoding.

Can you check the spanish-utf8 file, as well?
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

3nd3r

#2
I'm using UTF-8 (I guess...) as you may see if you load the rendered source code like I shown before...

This is my index.spanish_es-utf8.php :
<?php
// Version: 1.1.2; index

global $forum_copyright$forum_version$webmaster_email;

// Locale (strftime, pspell_new) and spelling. (pspell_new, can be left as '' normally.)
// For more information see:
//   - http://www.php.net/function.pspell-new
//   - http://www.php.net/function.setlocale
// Again, SPELLING SHOULD BE '' 99% OF THE TIME!!  Please read this!
$txt['lang_locale'] = 'es_ES.utf8';
$txt['lang_dictionary'] = 'es';
$txt['lang_spelling'] = '';

// Character set and right to left?
$txt['lang_character_set'] = 'UTF-8';
$txt['lang_rtl'] = false;

$txt['days'] = array('Domingo''Lunes''Martes''Mi&eacute;rcoles''Jueves''Viernes''S&aacute;bado');
$txt['days_short'] = array('Dom''Lun''Mar''Mi&eacute;''Jue''Vie''S&aacute;b');


Thanks for your interest  :)

metallica48423

is that file the one download from our downloads page?
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool


3nd3r

Maybe if I do "Convert HTML-entities to UTF-8 characters" could fix anything?

I'm totally lost... Don't know what to do...

metallica48423

Im lost as to why this happens as well.  You could try it though i doubt it would do anything.  I don't know why it'd be cut off, it makes no sense at all.

I'll try and get someone who's more knowledgeable on the language support side of things to take a look :)
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

3nd3r

I think I've finally found out the thing... A totally stupid myself miss...  O:)

I've read and checked all language files... A really hard work. But I've found no errors...

Then I've begun checking all settings... And you know what? I've haven't selected the language "spanish-utf8" in Administration > Server config > Core configuration > Forum default language

So... My apologies for your missed time. It's resolved.

Thank you very much. Please don't write anybody about this... It's done.

Advertisement: