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

  • Home
  • SEARCH
  • 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 8557777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:39:05+00:00 2026-06-11T15:39:05+00:00

In my app, I generate a UTF8-encoded CSV file with CHCSVWriter and display it

  • 0

In my app, I generate a UTF8-encoded CSV file with CHCSVWriter and display it using QLPreviewController. The file may have some special characters, such as umlauts (ü, ä), and I have checked the files and they are being generated properly. However when they are displayed with QLPreviewController, the characters are screwed up! I have checked my encodings throughout, and they are all UTF-8, so the code points are not being corrupted. Is there a problem with QLPreviewController? Any suggestions?

Here is the code I am using to create and display the CSV file:

NSString *path = @"my path";

CHCSVWriter *csvWriter = [[CHCSVWriter alloc] initWithCSVFile:path atomic:NO];
csvWriter.encoding = NSUTF8StringEncoding;
NSDictionary* w;
for (w in items) {
    [csvWriter writeField:[w valueForKey:@"a"]];
    [csvWriter writeField:[w valueForKey:@"b"]];
    [csvWriter writeLine];
}
[csvWriter closeFile];
[csvWriter release];

QLPreviewController *ql = [[QLPreviewController alloc] init];
[ql setDataSource:self];
[self presentModalViewController:ql animated:YES];
[ql release];

And here is what is being displayed:

enter image description here

  • 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-06-11T15:39:07+00:00Added an answer on June 11, 2026 at 3:39 pm

    I also have this problem when viewing utf-8 html files.

    I solved it by setting <meta http-equiv='Content-Type' content='text/html; charset=utf-8'> in the header.

    UTF-16 or Latin1 worked fine without the encoding header, so if you ex. encode your file in UTF-16 it should work.

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

Sidebar

Related Questions

I wrote a simple Sinatra app that generate an image using rmagick from some
I'm using PDFKit in my Rails app to generate PDF's. Problem is some of
I have my android app developed, I generate the apk file and it works
I have small web app that generate PDF files as a report. I'm trying
I am using App Engine to generate a HTML table corresponding to my GQL
I have an app which will generate 5 - 10 new database records in
I generate XML using JAXB2 for an standalone java app that uses maven 3,
I'm using QBFC to generate invoices in a Quickbooks integrating app. I'm getting an
I am trying to generate xml file as a background task using resque gem
I have tried all that i could to generate the R.java file but in

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.