Any recommendations for an editor to help find invalid UTF-8 characters?

I'm generating some XML programmatically. The content has some old invalid characters which are not encoded as UTF-8. For example, in one case there is a long dash character that I can clearly see is ISO-8859-1 in a browser, because if I force the browser to view in ISO-8859-1 I can see the character, but if I view in UTF-8 the characters look like the black-diamond-with-a-question-mark.
BBEdit will warn me that the the file contains invalid UTF-8. But it doesn't show me where those characters are.
If I try to load the XML in a browser, like Chrome, it will tell me where the first instance is of an invalid character, but not where all of them are. So I was able to locate the one you see in the screenshot and go in and manually fix that one entry.. But in BBEdit it again just shows a default invalid character symbol.
What I'd like to be able to do are two things:
(1) Find all invalid characters so I can then go and fix them all at once without repeated "find the first invalid character" fails when loading the XML in a browser.
(2) Know what the characters are (rather than generically seeing a bad character symbold) so  I can programmatically strip them out or substitute them when generating the XML. So I need to know what the character values (e.g. the hex values) are for those characters so I can use the replace() method in my server-side JavaScript to get rid of them.
Anybody know a good editor I can use for these purposes?
Thanks,
Doug

Well, now BBEdit doesn't complain anymore about invalid UTF-8 characters. I've gotten rid of all as far as BBEdit is concerned. But Chrome and other browsers still report a few. I'm trying to quash them now, but because the browsers only report them one-by-one I have to generate the XML multiple times to track them down, which takes one hour per run.
I think there are only a few left. One at line 180,000. The next at like 450,000. There are only about 600,000 lines in the file, so I think I'll be done soon. Still... it would be nice to have a Mac tool that would locate all the invalid characters the browsers are choking on so I could fix them in one sweep. It would save hours.
Does anybody know of such a tool for the Mac?
Thanks,
Doug

Similar Messages

  • Any recommendations for a new Graphics card for Mac Pro?

    Any recommendations for a new Graphics card for mac pro edit in Premiere 2014 and I need to have   output to a monitor my current graphics card is ATI Radeon HD Graphics 5870 1024 MB I find better for what I need?

    Look at this EVGA card for the Mac

  • Any recommendations for a flash player? I've tried opera mini but it really doesn't work.

    Any recommendations for a flash player to watch videos and movies? I've tried opera mini per support but doesn't work.

    Depending on what sites you are trying to access, you might find that some of them (probably more so if they are news sites) have their own apps in the App Store which might let you get some of the content that you want (and there is the built-in YouTube app). In terms of browsers there is Skyfire which 'works' on some sites - but judging by the reviews not all sites.

  • I have Mac OSX Lion 10.7.4, Quickbooks Pro 2010, Parallels Desktop 7 for Mac, Operating in Windows 7.  Are there any recommendations for running Quickbooks Pro 2010?

    I have Mac OSX Lion 10.7.4, Quickbooks Pro 2010, Parallels Desktop 7 for Mac, Operating in Windows 7.  Quicbooks Pro 2010 is not responding or opening currently. Quickbooks does not support Parallels anymore.  I hear Apple Bootcamp is an opton.  Are there any recommendations for running Quickbooks Pro 2010 on Mac?

    QuickBooks Pro 2010 for Mac is not supported in Lion. QB Pro 2011 will work, but I just got an email today that 2011 will not be updated to work in Mountain Lion. QB Pro 2012 will be updated for ML.
    Be aware that the Mac version of QuickBooks is shamefully lacking in features compared to the Windows version. I do use the Mac version, but it has more features than I need for a small business, so it doesn't affect me. No one knows why Intuit seems to hate Mac users, but they show it every day.
    If QB Pro 2012 for Mac can be downloaded as a demo, I would strongly suggest testing with it before making a final decision. You will be able to import the Windows data, but possibly not all of it, depending on the Windows version features you use.
    Boot Camp allows you to install Windows on its own, bootable partition. When you boot to it, you are of course running Windows in every sense of the word. Just on Mac hardware rather than typical PC gear. Your Windows version of QB will work there without issue. The problem is having to boot back and forth between Windows and OS X, depending on what software it is you need to use at the time.

  • Are there any recommendations for virus checking/removal programs for the Mac?

    Is there any recommendations for virus checking/removal programs for the iMac and MacBrook Pro running OS 10.6.7?

    as has been said, you need no AV on your Mac. more info here: Mac Virus/Malware Info.
    if, however, you exchange files with windows users on a regular basis, you might want to install ClamXav lest you pass an infected file on without realizing it.

  • The Touch ID symbol has disappeared off the Lock Screen of my iPhone 5S since upgrading to IOS 7.1.  Is any one else experiencing this.  Any recommendations for fixes?

    The Touch ID symbol has disappeared off the Lock Screen of my iPhone 5S since upgrading to IOS 7.1.  Is any one else experiencing this.  Any recommendations for fixes?  The finger scan in Settings seems to be working OK for me.

    Hello there, cruzrt.
    The following Knowledge Base article offers up some great steps to try for troubleshooting issues with an iOS device not responding:
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/ts3281
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Anyone have any recommendations for where to buy additional Pages templates?

    Anyone have any recommendations for where to buy additional Pages templates?

    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=9&sid=d1c6417d261e6e df4d03989b9999cb24&mforum=iworktipsntrick
    Peter

  • Any apps for iphone/itouch that help u make apps, something like scratch?

    anyone know?

    Dave Sica wrote:
    Are there ANY apps that run on the iPhone 3? (So far, I haven't found any, even ones that work on my similar vintage iPod touch.)
    There are thousands of games and apps which work on the iPhone 3G. Here are some tools to help find compatible apps (The first one is my recommendation).
    iOSSearch - search the iTunes store for compatible apps.
    Vintapps 3.1.3 - paid app.
    Apple Club - filter apps by iOS version.
    If you do a search for GPS, you will get a lot of results for compatible apps. As far as EPUB readers go, this is one thing that really peeves me. At one time you could get versions of iBooks and Kindle that worked on the 3G iPhone and 2nd gen. iPod, but you can no longer download them from the iTunes store. A couple months back, I posted links to a couple EPUB readers which were still compatible with these devices, and within a month, both apps had been upgraded so as to make them incompatible. There are still compatible EPUB readers in the iTunes store (many localized with Korean-language menus) if you want to look. Downloading books to these readers may not be a straightforward process.
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.
    <Edited by Host>

  • M9517c failing Nvidia chipset; any recommendation for cooling fan?

    I have a M9517c that finally failed. Took me 3 days to diagnose.
    Do you have a recommendation for the heat sink / cooling fan combo?
    can you provide a link?
    Many thanks

    Hello HPElite. I would recommend you contact our HP Part Store, as they will be able to help determine the best part for you, and will give you the correct price. First of all, here are the specifications of your computer:
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&dlc=en&docname=c01638238
    If you want to call the Part Store, their number is 1-800-227-8164. The hours to call are Monday to Friday 7:00am-7:00pm CST, and Saturday 7:00am-6:00pm CST. If you want to check out the website, here is the link:
    http://h20141.www2.hp.com/hpparts/
    If you have any other questions for me, let me know. I'm only here to help!
    Mario
    I worked on behalf of HP.

  • Any recommendations for buying a printer for my Mac Book Pro

    Looking to buy a printer for my Mac Book Pro!! Any recommendations???

    Any will work. "AirPrint" compatible printers will work even better, since they require no setup whatsoever, and will even work with iOS devices  (and with some compatible android/windows phones) you might end up buying.

  • Anyone have any recommendations for a secondary display?

    I would like the 20" cinema display from apple, but I wasn't sure if it was worth the price. I know through Amazon.com, I can get it for 719.99 (no tax and free shipping). Is there a place where I could get it cheaper? Or any recommendations on other brands?

    I did consider a 20" Apple but one day I happened to have a look at Dell's site just out of curiosity and I am now saving up for a Dell 24". Dell offers much more functionality with its displays. Sure they're not as pretty as Apple's displays, but IMHO they have better specs for money. A lot of Mac users have made good reports re: using Dell displays with their Macs.
    p53

  • Any recommendations for Firefox security add-ons?

    I noticed here on the site, that several people recommend using Firefox with the "No Script" add-on.
    Does anyone happen to have a good link for downloading a Mac version of this?
    Are there maybe any suggestions for other security add-ons worth installing for Firefox / Thunderbird?

    Well, then I can't understand why this is happening. Found this for an earlier version.
    It's important to understand that whitelisting is slightly limited by domain-obscuring page elements like iframes. When a call is made from an iframe, it's made from the domain in the iframe's source, so Ghostery can't tell that it's coming from the domain you've whitelisted. As a result, it may appear that Ghostery is blocking on a site you've whitelisted, even though it's doing its best to follow your instructions. Any script, ad, widget, or other element that calls directly from the whitelisted domain will go through without a second glance.
    BUT, it's supposed to have been "relaxed" in 2.5.2, the version I'm using; i.e. now it's supposed to allow anything from a domain regardless of where it's coming from.
    And, yours is showing brightcove as blocked. If so, you shouldn't be getting any video, since that's where it all comes from in the Times.
    You said video was loading on the video page, but I wonder are you able to load video on the homepage? It's in a large box "Video" near the middle of the page.
    I have an email in to their support.

  • Any recommendations for virus protection software.

    Looking for recommendation for virus, malware protection for iMac running Maverick

    Here it is again.
    Many third party "anti-virus" programs only cause misery, and account for the vast majority of user-inflicted Mac problems reported on this site.
    OS X already includes everything it needs to protect itself from viruses and malware. Keep it updated with software updates from Apple.
    A much better question is "how should I protect my Mac":
    Never install any product that claims to "speed up", "clean up", "optimize", or "accelerate" your Mac. Without exception, they will do the opposite.
    Never install pirated or "cracked" software, software obtained from dubious websites, or other questionable sources. Illegally obtained software is almost certain to contain malware.
    Don’t supply your password in response to a popup window requesting it, unless you know what it is and the reason your credentials are required.
    Don’t open email attachments from email addresses that you do not recognize, or click links contained in an email:
    Most of these are scams that direct you to fraudulent sites that attempt to convince you to disclose personal information.
    Such "phishing" attempts are the 21st century equivalent of a social exploit that has existed since the dawn of civilization. Don’t fall for it.
    Apple will never ask you to reveal personal information in an email. If you receive an unexpected email from Apple saying your account will be closed unless you take immediate action, just ignore it. If your iTunes or App Store account becomes disabled for valid reasons, you will know when you try to buy something or log in to this support site, and are unable to.
    Don’t install browser extensions unless you understand their purpose. Go to the Safari menu > Preferences > Extensions. If you see any extensions that you do not recognize or understand, simply click the Uninstall button and they will be gone.
    Don’t install Java unless you are certain that you need it:
    Java, a non-Apple product, is a potential vector for malware. If you are required to use Java, be mindful of that possibility.
    Disable Java in Safari > Preferences > Security.
    Despite its name JavaScript is unrelated to Java. No malware can infect your Mac through JavaScript. It’s OK to leave it enabled.
    Block browser popups: Safari menu > Preferences > Security > and check "Block popup windows":
    Popup windows are useful and required for some websites, but popups have devolved to become a common means to deliver targeted advertising that you probably do not want.
    Popups themselves cannot infect your Mac, but many contain resource-hungry code that will slow down Internet browsing.
    If you ever see a popup indicating it detected registry errors, that your Mac is infected with some ick, or that you won some prize, it is 100% fraudulent. Ignore it.
    Ignore hyperventilating popular media outlets that thrive by promoting fear and discord with entertainment products arrogantly presented as "news". Learn what real threats actually exist and how to arm yourself against them:
    The most serious threat to your data security is phishing. To date, most of these attempts have been pathetic and are easily recognized, but that is likely to change in the future as criminals become more clever.
    OS X viruses do not exist, but intentionally malicious or poorly written code, created by either nefarious or inept individuals, is nothing new.
    Never install something without first knowing what it is, what it does, how it works, and how to get rid of it when you don’t want it any more.
    If you elect to use "anti-virus" software, familiarize yourself with its limitations and potential to cause adverse effects, and apply the principle immediately preceding this one.
    Most such utilities will only slow down and destabilize your Mac while they look for viruses that do not exist, conveying no benefit whatsoever - other than to make you "feel good" about security, when you should actually be exercising sound judgment, derived from accurate knowledge, based on verifiable facts.
    Do install updates from Apple as they become available. No one knows more about Macs and how to protect them than the company that builds them.
    Summary: Use common sense and caution when you use your Mac, just like you would in any social context. There is no product, utility, or magic talisman that can protect you from all the evils of mankind.

  • Any recommendations for an automated backup application?

    Hi,
    A company that I work for is looking for an automated back up solution.
    Currently, they have Intel iMacs running 10.4.10. They want to have automated backups to their Windows server. The protocol used is Samba, if I am not mistaken. They do not want to back up their entire hard drives, only certain files.
    The dot mac Backup application is not what they want.
    I am not familiar with automated back up solutions in an office environment.
    Any recommendations are appreciated!

    I'm not sure if they want to spend the money on an Enterprise level solution, but if they do then there's one outstanding product: BRU.
    If they are looking for something mainly client oriented but that can backup to a network device then my choice is Synchronize! Pro X because it provides an almost complete backup solution. About the only thing it cannot do is backup across multiple optical media. It supports backup to network devices and will even mount a network device if required. It also supports a fairly easy method of creating backup sets consisting of selected files and/or folders.

  • Any recommendations for a recovery software for my lost photos on my external drive?

    Would like recommendations for a reputable recovery software for my lost photos from my external drive that I used with my MacBook Pro.

    General File Recovery
    If you stop using the drive it's possible to recover deleted files that have not been overwritten by using recovery software such as Data Rescue II, File Salvage or TechTool Pro.  Each of the preceding come on bootable CDs to enable usage without risk of writing more data to the hard drive.  Two free alternatives are Disk Drill and TestDisk.  Look for them and demos at MacUpdate or CNET Downloads.
    The longer the hard drive remains in use and data are written to it, the greater the risk your deleted files will be overwritten.
    Also visit The XLab FAQs and read the FAQ on Data Recovery.

Maybe you are looking for

  • Parsing a querystring

    hi, i have a jsp that validates a login form and depending on the result of the validation, redirects the user to the main page (validation ok), or redirect the user to the login page with a querystring, like this: "response.sendRedirect("login.jsp?l

  • Shared photo stream gone from iOS but still on laptop

    I own a shared photo stream that was created on my iPhone. Sometime in the past few hours it disappeared from my phone, iPad and the other iPhone under my Apple ID. However it still shows on my laptop and is up to date. How can I get it back on my iO

  • Why does addressbooksync takes long and using really a lot of ram!?

    When I sync the iPhone with iTunes and look at my activity monitor, it shows that it takes more and more ram to do this. After 5 minutes while sysncing the addressbook only, the amount of ram used is already 6.70 gb! Here a screenshot: Why is this? I

  • SCCM MP Account from accessing across untrusted domain

    Hi, I am wondering if anyone has any suggestion on how to setup MP connection account from MP in untrusted domain (DMZ) to site server. I tried to create a user account in the domain where SCCM primary site exists and configured that account for MP t

  • How to Hyperlink SWF File

    Sorry if this was already discussed, hyperlink swf hit nothing here and I don't know what else to search. I placed a client's .swf file in my web page and I am unable to hyper-link it back to her site. What am I missing?