HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Character support

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#29041 (In Topic #6661)
Avatar

Community saint

I have set my site to utf-8. I dont know if this is the issue, but when I type in the dash (Alt+0150 or Alt+0151) I get �" instead of dash in the result.
Is this a bug or I got to live with that?
Back to the top
 
Posted
Rating:
#29052
Avatar

test - test


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#29053
Avatar

My test above probably indicates it is a utf-8 problem. Could you place a dash somewhere on your site then send us/me a link -- I might then be able to work out something from that. There are a number of different stages where it could be going wrong (input, Comcode conversion, Comcode rendering, Output, Browser interpretation).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#29114
Avatar

Community saint

I wrote them here: Critical error
at the very end of the text I placed - - (0150) – (0151) … (0133) ! (033). The dashes do not show corectly
Back to the top
 
Posted
Rating:
#29133
Avatar

This has given me a great opportunity to learn unicode better, thanks.

There's some code in ocPortal that is breaking this. In sources/lang.php, above:

Code

}

// ====
// CODE
// ====

add this:

Code

   if (get_charset()=='utf-8')
   {
      global $HTML_ESCAPE_1,$HTML_ESCAPE_2;
      $HTML_ESCAPE_1=array('/&/','/"/','/\'/','/</','/>/');
      $HTML_ESCAPE_2=array('&amp;','&quot;','&#039;','&lt;','&gt;');
   }


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#29158
Avatar

Community saint

But in these lines there is nothing about the dashes (0150, 0151). How should I encode them here. Because after I have inserted this code, the bug stayed
Back to the top
 
Posted
Rating:
#29170
Avatar

These lines replace some substitution arrays ocPortal defines at any earlier point. The arrays defined earlier perform substitutions on the "~" character. This character is "inside" the unicode dash character, if the unicode is interpreted as ASCII instead (which PHP does).

The bug would go for any new content added, but old content would need editing.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#29172
Avatar

Oh – set your charset to utf-8 rather than UTF-8. I should have checked that.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#29429
Avatar

Community saint

Chris Graham said

Oh – set your charset to utf-8 rather than UTF-8. I should have checked that.

It is utf-8, but the 0150 dash is not converted corectly even with the new content :-(
Back to the top
 
Posted
Rating:
#29432
Avatar

When I checked you site it was in upper case -- has this changed?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#29460
Avatar

Community saint

I am so sorry. You were right. I was shure it was lowercase.
Now it works
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: