<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18876">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>no solutions for this?? I've tried everything I can 
think of...escaping the characters, wrapping them in all sorts of other 
characters, but no luck.</FONT></DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px" 
dir=ltr>
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> 
  <A title=neil@esl-lounge.com href="mailto:neil@esl-lounge.com">Neil 
  Coghlan</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=support@drupal.org 
  href="mailto:support@drupal.org">support@drupal.org</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, April 22, 2010 12:32 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> slight problem with 
  encoding</DIV>
  <DIV><BR></DIV>
  <DIV><FONT size=2 face=Arial>I have the following php snippet giving me a list 
  of taxonomy terms for a certain vocab and certain content type. </FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>&lt;?php<BR>$vid = 4;<BR>$items = 
  array();<BR>$type = manager;<BR>$terms = taxonomy_get_tree($vid);<BR>foreach ( 
  $terms as $term ) { <BR>&nbsp;&nbsp;&nbsp; $count = db_result(db_query("SELECT 
  COUNT(term_node.nid) FROM {term_node} JOIN {node} ON node.nid = term_node.nid 
  WHERE node.type = '%s' AND tid = %d", $type, $term-&gt;tid)); 
  <BR><STRONG>&nbsp;&nbsp;&nbsp; $items[] = l($term-&gt;name, 
  "personnel-search?type=$term-&gt;tid") . " ($count)";<BR></STRONG>}<BR>if ( 
  count($items) ) {&nbsp; print theme('item_list', 
  $items);}<BR>?&gt;</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>the problem is in the bolded line, specifically 
  the question mark and equal sign. I get a taxonomy list like 
this:</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>retail (3)</FONT></DIV>
  <DIV><FONT size=2 face=Arial>accounts (2)</FONT></DIV>
  <DIV><FONT size=2 face=Arial>IT (1)</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>when I hover over these, the links look perfect 
  down in the status bar, but when I click on them, they come out in the URL bar 
  as such:</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>...personnel-search</FONT><FONT size=2 
  face=Arial><STRONG>%3F</STRONG>type<STRONG>%3D</STRONG>25</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>and thus give me a 404. Is there an easy way of 
  encoding it right?</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
  <DIV><FONT size=2 face=Arial>thanks<BR><BR>Neil</FONT></DIV>
  <DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>