search for: decode_entities

Displaying 6 results from an estimated 6 matches for "decode_entities".

2006 May 24
0
HTMLEntities.decode_entities - problems with output
...I''m attempting to do the Iconv conversion from ASCII to UTF-8 because I''m assuming that I have to in order to use the HTMLEntities calls. I am trying to convert back to ISO-8859-1 because I''m assuming that I need to. If I just try to print the output of HTMLEntities.decode_entities to a file without doing any iconv conversions, I get A-circumflex before every modified character. A-circumflex is the ISO-8859-1 equivalent of \302. What am I missing here? How can I successfully display   as a space in a file that I am writing to? I''d rather not have to...
2014 Dec 16
2
Replace atoi and atol with strtol strtoul:Need Help
Hello , I came across this function *HtmlParser::decode_entities(string &s)* in *xapian-application/omega/htmlparse.cc* which basically does is extract hex value if any or extract number.For extracting number atoi is used and value returned by it is stored in variable "val" , I think so replacing atoi with strtoul would be useful here as number can...
2006 Jan 31
1
retrieving attributes of searchresults
...rds[$i]; $w =~ s/[\.-]$//g; $doc->add_posting($w,++$i) if $w; } $db->add_document($doc); sub _add_attr { my ($doc,$data) = @_; for my $k (keys %$data) { if (ref $data->{$k}) { # arrayref / multivalue field for my $v (@{$data->{$k}}) { $doc->add_term($k . lc(decode_entities($v))); } } else { next unless defined $data->{$k}; $doc->add_term($k . lc(decode_entities($data->{$k}))); } } } ------------>8------------------------------------------------------- ------------>8------------------------------------------------------- ##...
2009 Mar 05
0
Insert using Rake Task
...ems no error was trace, but when I look the table it doesn''t insert.I select the data here MysqlDB.Tablename and update/insert here SQLserverDB.TableName. # Start Here # rake mysqldata_select:sqldata_update def clean_html(html) new_html = strip_tags(html) # remove html tags new_html = decode_entities(new_html) # remove html encoded items new_html = new_html.strip # remove any whitespace from the edge of content end namespace :mysqldata_select do LOCATIONS = {1 => 6, 2 => 5, 3 => 5} task :sqldata_update => :environment do include ActionView::Helpers::SanitizeHelper...
2014 Dec 15
2
Replace atoi and atol with strtol strtoul:Need Help
Hello, I am working on replacing atoi () and atol() functions with strtol() and strtoul() . I came across many files which uses statement like these time_t secs= atoi(data_span.c_str()), here time_t Datatype is not known but wikipedia says that it is integer so is it necessary to replace atoi with strtol over here ?? And is their any document which helps me what each file function does like
2014 Dec 18
4
Replace atoi and atol with strtol strtoul:Need Help
...(val != cgi_params.end()) { sort_key = atoi(val->second.c_str()); Thank You, Priyank Bhatt On 17 December 2014 at 03:38, Olly Betts <olly at survex.com> wrote: > > On Wed, Dec 17, 2014 at 01:15:12AM +0530, Priyank Bhatt wrote: > > I came across this function *HtmlParser::decode_entities(string &s)* in > > *xapian-application/omega/htmlparse.cc* which basically does is extract > hex > > value if any or extract number. > > The code you refer to is actually parsing a decimal value (like &#38;) - > the hex case (like &#x26;) uses sscanf(). > >...