Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6255103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:18:10+00:00 2026-05-24T14:18:10+00:00

I have a large constant html string which I’d like to display on my

  • 0

I have a large constant html string which I’d like to display on my UIWebView. For some reason, when I try to use the constant string ( with @”LARGE_STRING” ) I get some weird errors, saying I have an unexcpected ‘@’ at the start, that I miss terminating ‘ ” ‘ characters, that I use undeclared expressions and etc. the thing is – I do escape the string, atleast the ‘ ” ‘ in it.

What am I missing in here?

Tnx!

Edit: Example:

NSString *myString = [NSString stringWithString:@"<title>בסיסי HTML לימוד</title> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-8"> <body  bgcolor="#b5deef"bbackground="gifs/rekablue.gif"> <center> <table border=0 cellpadding=0 cellspacing=0> <tr> <td> <table border=0 cellpadding=0 cellspacing=0> <tr> <td> <table border=0 cellpadding=0 cellspacing=0><tr> <td width="246"></td> <td><img src="gifs/lim.gif"></td><td width="50"></td><td><a href="basic1.htm"><img src="gifs/hak.gif" border=0></a></td> </tr></table> <tr><td> <table border=0 cellpadding=0 cellspacing=0><tr>  <td width="230"></td> <td><img src="gifs/m.gif"></td><td width="55"></td><td><a href="basic2.htm"><img src="gifs/ktiv.gif" border=0></a></td> </tr></table> <tr><td> <table border=0 cellpadding=0 cellspacing=0><tr> <td width="207"></td> <td><img src="gifs/ud.gif"></td><td width="60"></td><td><a href="basic2.htm"><img src="gifs/amud.gif" border=0></a></td> </tr></table> <tr><td> <table border=0 cellpadding=0 cellspacing=0><tr> <td width="163"></td> <td><img src="gifs/tl.gif"></td><td width="55"></td><td><a href="basic2.htm"><img src="gifs/reshon.gif" border=0></a></td> </tr></table> <tr><td> <table border=0 cellpadding=0 cellspacing=0><tr> <td width="133"></td> <td><img src="gifs/ml.gif"></td><td width="55"></td><td><a href="basic3.htm"><img src="gifs/text1.gif" border=0></a></td>  </tr></table> <tr><td> <table border=0 cellpadding=0 cellspacing=0><tr> <td width="108"></td> <td><img src="gifs/t.gif"></td><td width="35"></td><td><a href="basic4.htm"><img src="gifs/kish.gif" border=0></a></td> </tr></table> <tr><td> <table border=0 cellpadding=0 cellspacing=0><tr> <td width="93"></td> <td><img src="gifs/h.gif"></td><td width="35"></td><td><a href="basic5.htm"><img src="gifs/reshim1.gif" border=0></a></td> </tr></table> <tr><td> <table border=0 cellpadding=0 cellspacing=0><tr> <td width="70"></td> <td><img src="gifs/b.gif"></td><td width="42"></td><td><a href="basic6.htm"><img src="gifs/tmunot.gif" border=0></a></td> </tr></table> <tr><td>  <table border=0 cellpadding=0 cellspacing=0><tr> <td width="40"></td> <td><img src="gifs/s.gif"></td><td width="53"></td><td><a href="basic7.htm"><img src="gifs/rekaim1.gif" border=0></a></td> </tr></table> <tr><td> <table border=0 cellpadding=0 cellspacing=0><tr> <td width="10"></td> <td><img src="gifs/s1.gif"></td><td width="45"></td><td><a href="basic9.htm"><img src="gifs/tfasim.gif" border=0></a></td> </tr></table> <tr><td> <table border=0 cellpadding=0 cellspacing=0><tr> <td width="8"></td> <td valign=top><img src="gifs/si.gif"></td><td width="30"></td><td><a href="basic8.htm" border=0><img src="gifs/tavlaot.gif" border=0></a></td> </tr></table> </td></tr> </table> </td>  <td valign=bottom><a href="default.htm" onMouseOver="self.status='חזרה לעמוד פתיחה';return true" onMouseOut="self.status='';return true"><img src="gifs/shtml11.gif" border=0></a>   <a href="bm_guide.htm#html" onMouseOver="self.status='אתרים נוספים';return true" onMouseOut="self.status='';return true"><img src="gifs/shtml10.gif" border=0></a></td></tr></table> </center> </body>"];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T14:18:10+00:00Added an answer on May 24, 2026 at 2:18 pm

    If you have ” characters in the string, then you must escape them:

        NSString *myString = @"This string contains \"quotes\". If they are not \"escaped\", that will cause errors".
    

    Or, another possibility, you are using #defines like

    #define LARGE_STRING "This is an extremely large string (well, OK, not so large)"
    

    Then you should do

    #define LARGE_STRING @"This is an extremely large string (well, OK, not so large)"
    

    and

        NSString *myString = LARGE_STRING;
    

    Edit

    Hmmm… your example looks fine. It should compile, if it really contains the HTML-style " codes and not hard-coded " characters. Just make sure your string (it is really long indeed) is not wrapped with hard linefeeds.

    I just tried, and your example compiles fine, in Objective-C (Xcode 4.1). Note that if you try to pass such a string to a C function, it should be converted to a valid C string first.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have large images displayed in a grouped tableview. I would like the images
I have a function which is constant to its argument, for example let is_prime
I have recently discovered an annoying problem in some large program i am developing;
Once again, I have a problem for which I would like to shave off
I have a (large) horizontally scrolling view, and a bunch of rectangles I'd like
I have a large number of lists (35 MB in total) which I would
I have written some code which performs a Monte Carlo simulation and produces curves
I have a Java program performing some large analysis tasks, running through a loop
I have large data sets (10 Hz data, so 864k points per 24 Hours)
I have large batches of XHTML files that are manually updated. During the review

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.