Apostrophes Again

Wow, the world of special characters and entities rivals
mod-rewrites as
a black art...
I've long used &-#-8-2-1-7; (without the hyphens) to
represent
apostrophes in my articles, until David Powers informed me
that that's
actually the code for a right single quote (complemented by
the single
quote on the left).
That launched me on the surprisingly difficult quest to
discover exactly
WHAT people use to represent apostrophes. I was finally told
to use
this... ’ I don't know how it will show up in this post,
but it looks
pretty much like a stick-figure apostrophe leaning slightly
to the
right. Here it is again, to the left of a stick-figure
apostrophe: ’'
Anyway, I began replacing the apostrophes in my articles.
Today, I began
previewing some of my revised articles, only to discover that
Opera
doesn't like my new apostrophes. They looked fine in Firefox
and Safari,
but Opera displayed them as tiny black diamonds with white
question
marks. When I viewed the source code, they looked like tiny
squares.
Here's where it gets really weird: A few hours later, I
looked at my
pages in Firefox and Safari again, and they had also gone
bad. Safari
displays the apostrophes as black diamonds in both the text
and source code.
I have this in the head section:
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
Does anyone have any ideas what's going on? I'm about ready
to go back
to using &-#-8-2-1-7-; at least it works, and it can be
copied and
pasted between programs. My pages validate with it, so it
must not cause
any technical problems, right?
Thanks.

.oO(David Blomstrom)
>OK, I went back to latin1_general_ci and &#-8217;,
and everything seems
>to be OK. However, I'm going to take your advice and
implement some
>additional changes, like changing the collation on my
text fields to utf8.
Not only the collation, but the charset. Might take some time
to get
used to it, though, but IMHO it's worth it. Once you got it
all running
with UTF-8, it simply works.
>Michael Fesser wrote:
>
>> My text columns are all defined as UTF-8 (utf8 in
MySQL - note the
>> missing dash) without an explicitly defined
collation, so it defaults to
>> utf8_general_ci, e.g.
>>
>> CREATE TABLE foo (
>> bar CHAR(40) CHARACTER SET utf8 NOT NULL DEFAULT '',
>> ...
>> ) ENGINE=InnoDB DEFAULT CHARACTER SET latin1;
>
>I just created my first table via SQL ever after copying
the following
>code from a tutorial:
>
>CREATE TABLE people (name VARCHAR(30), age INTEGER,
height FLOAT, date
>DATETIME)
>
>Then I tried your code, but it appears that I need to
replace ... (on
>the third line) with something relevant - but I'm not
sure what.
It was just a snippet from a real query (with another table
name of
course ...) Usually there are some more columns, a primary
key
definition, maybe some indexes and foreign key constraints
and so on - I
simply stripped all that stuff in the example above. That was
the '...'
part.
>May I
>ask how I can modify your script so it works as is?
In its most simple form this should do:
CREATE TABLE foo (
bar CHAR(40) CHARACTER SET utf8
I usually declare some more things, for example the used
storage engine
and the default charset for the table, just to be sure and
independent
from the server configuration. You can safely ignore them for
now.
Given your own query from above, I would write it like this
(just
reformatted for legibility, one column definition per line):
CREATE TABLE people (
name VARCHAR(30),
age INTEGER,
height FLOAT,
date DATETIME
Making the 'name' column UTF-8 is pretty easy then:
CREATE TABLE people (
name VARCHAR(30) CHARACTER SET utf8,
age INTEGER,
height FLOAT,
date DATETIME
>Also, isn't there some way to display an existing table's
code using
>phpMyAdmin? In other words, if you have a table named
table_animals, you
>could open it, then somehow display a CREATE TABLE
statement that you
>could use to create an identical table in another
database.
>
>I checked in SQL, Export and Operations but didn't find
such a function.
I usually don't use phpMyAdmin, I prefer the command line. On
the MySQL
command line you could do a query like
SHOW CREATE TABLE table_animals\G
to get the full CREATE statement that was used internally by
MySQL to
create that table. Then there's also the powerful tool
mysqldump, which
can be used to dump a table structure to screen or into a
file:
mysqldump -uUsername -p -d DatabaseName table_animals
You can also use phpMyAdmin to get such a dump, but you'll
probably have
to copy the CREATE statement from it by hand. I don't know if
there's an
export option to only dump the table structure and not all
the data
(this is what the -d parameter does if you do it on the
command line).
>So in other words, I should do something like this?:
>
>* * * * *
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"
>"
http://www.w3.org/TR/html4/loose.dtd">
><?php
>header('Content-Type: text/html; charset=UTF-8');
>?>
><html>
><head>
><meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
><title></title>
>
>* * * * *
>
>I'm assuming the header thus inserted renders <meta
>http-equiv="Content-Type" content="text/html;
charset=UTF-8"> somewhat
>redundant, but I should probably hang on to it anyway,
right?
Correc, it is redundant. Dreamweaver always inserts it by
default and it
doesn't hurt anyway, but it's usually pretty useless. Its
only real use
is if the document is served to a browser without a server,
for example
a local copy stored on disk. But if the page is delivered by
a server,
then the HTTP header matters and always takes precedence.
It's safe to
use both the HTTP header and the meta thingy, just make sure
that both
have the same value.
>You also wrote, "The second thing can be solved by
sending this query
>right after connecting to the DB::"
>SET NAMES 'utf8';
>
>"This sets the connection encoding between the DB and
your script."
>
>How do you do that "SET NAMES utf8"? Or is that what this
is all about?...
>
>header('Content-Type: text/html; charset=UTF-8');
Nope, this is HTTP, not MySQL.
There are at least four places in MySQL where a character
encoding is
taken into account: the database, the tables, the columns and
the
connection to the client/script. All these encodings can be
defined
independently if necessary, but what really matters in
practice are the
encodings used in the table columns (as shown in the examples
above) and
the connection encoding. For example MySQL is able to store
the data as
UTF-8, but deliver it as something completely different to
your script.
We usually don't want this, so we set the connection encoding
to UTF-8
as well. This is done with the mentioned query. You should
send it as
the first query after establishing the connection to the DB:
mysql_connect(...);
mysql_query('SET NAMES utf8');
This ensures that all following data transfers between your
script and
the database will handle the data correctly as UTF-8 and
won't change
its encoding.
And simply spoken the header() call just does a similar thing
for the
way between your script and the user's browser:
SET NAMES utf8 header('Content-Type: ...')
DB ----------------> PHP Script
-----------------------------> Browser
It probably sounds more complicated than it actually is. ;-)
Micha

Similar Messages

  • After updating to Yosemite some of my photos will open and then Ill get a black screen with an apostrophe.  How can I fix this?

    After updating my OS to Yosemite 10.10.1 some of my photos will not display.  All of the previews will be there but when I click to open them they open up larger for a second and then the screen goes black and I get a grey apostrophe sign.  I updated iPhoto to 9.6 (910.29) and also repaired my permissions.  The problem still exists.  Can anyone help me?  I also have issues with iTunes but that's another story. 

    According to the link I provided it could still have its logging service running.  Did you read the info in the link I provided?  You can check it by launching Activity Monitor and under CPU search for cleanup.
    Since the photos are in the library I don't see the need at this time to reinstall iPhoto.  Maybe later.  Try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home/Library/ Preferences folder.
    2 - delete the contents the following folder: User/Library/Containers/com.apple.iPhoto
    3 - reboot, launch iPhoto and try again.
    NOTE: For Mavericks and Yosemite,  go to your Home folder and use the View ➙ Show View Options menu to bring the this window:
    where you can check the Show Library Folder checkbox.

  • How to replace typewriter (straight) apostrophe with typographic (curly) apostrophe?

    I have a manuscript I got off the Internet that has a bunch of isn?t's and wasn?t's and the like—due, I assume, to some miscommunication between MS Word's automatic curly quotes and the ASCII limits of ISO Latin 1. I tried doing a find-and-replace to put typographic apostrophes in place of the question marks. Pages found the question marks and put typewriter apostrophes in place of them, though I'd carefully entered a typographical apostrophe ((opt-shift-]) in the Replace field. So I tried again, to replace the typewriter apostrophes with typographical apostrophes. Pages now replaced the few typographical apostrophes I'd manually entered with typewriter apostrophes. Well, at least it's consistent. So far as Pages, Apple's flagship word-processing/page-layout app is concerned, there's apparently no such thing as a typographical apostrophe—something that was understood, as I recall, by the original MacWrite 25 years ago. So do I have to go back to doing all my editing in TextEdit (which seems to be much better at text work than Pages), or can somebody tell me how to persuade Pages to take care of this trifling little task correctly?

    Copy these two paragraphs into a Pages WP document:
    When you?re sleep deprived… parental control of baby?s sleep… meet baby?s needs consistently… respond to baby?s cries…
    "Parents should recognize that having their babies cry unnecessarily harms the baby permanently," Commons said. "It changes the nervous system so they?re overly sensitive to future trauma."
    Open the Find & Replace dialog. Enter Find: ? and Replace: ’ (opt-shift-}). (I.e. replace question mark with typographical apostrophe.) Click Replace All. It should say 5 Replaced. Check any of the replacements by enlarging the type; you’ll see an ASCII apostrophe ['] rather than the requested typographical version [’].
    Then enter Find:  " (space-") and Replace:  “ (space-opt-[), and click Replace All. It will say 1 Replaced, meaning the quote mark preceding "It" in the second sentence (the only quote mark preceded by a space). Enlarge the replacement to see it clearly; it's replaced an ASCII " with another ASCII ".
    So far as I can tell, Pages’ Find-Replace function can't tell the difference between ASCII apostrophe/quote marks and the typographical versions. Maybe it will once you turn on smart quotes in preferences; I haven't tried that -- but then of course you'd get smart quotes when you don't want them, for instance for something to be posted on an Internet forum, which often doesn't understand them. (The problems above and similar, often seen on the 'Net, are due to MS Word's having smart quotes on by default, so unaware users compose material with them and send it out over teh Interwebz, where they sometimes come through correctly, sometimes don't.)
    Try the same experiment in TextEdit; you'll get the requested typographical versions. And so I did, then copied the text back to Pages. Like I said, kinda shoddy for Apple's Pride & Joy word processor. AppleWorks, by the way, does it right.

  • Replacing quotes/apostrophes with smart quotes/apostrophes

    In previous versions of Pages, when pasted content included stardard quotes or apostrophes you could do a quick replace with smart quotes/apostrophes simply by doing a find and replace. Not so with the new Pages 5.
    Anyone figured out how to force Pages to do such a replace? Manually trying to do it on a long document is crazy.

    What's worse: I just did a global find and replace, trying to fix four dumb quotes in an entire document that I'd cut and pasted--and Pages turned every single smart quote into a dumb quote. In all 92 pages. 1,600 smart quotes dumbified. With no way for me to smarten them up again.
    Then, because I'm just as dumb as my quotes, I did the same thing with my single quotes/apostrophes.
    I know how I'll be spending my afternoon.

  • FM8 Quotes/apostrophes revisited

    I cannot use the '/" key with Smart Quotes on. I'm running FM 8.03 as part of the Tech Comm Suite under XP SP2. My maker.ini file reads <br /><br />; English curved quotes:<br />SmartQuotes=\xd4\xd5\xd2\xd3<br /><br />The version in Docs & Settings has no such section. <br /><br />Turning Smart Quotes off provides a partial resolution, as the "/' key works and I can use keyboard "shortcuts" to input the smart versions. <br /><br />These are the related cmds.cfg settings:<br /><br /><Command CharLeftDblQuote<br />     <Label Left Double Quote><br />     <Definition \xd2>><br /><br /><Command CharRightDblQuote<br />     <Label Right Double Quote><br />     <Definition \xd3>><br /><br /><Command SmartSingleQuote<br />     <ReservedLabel Long Smart Single Quote><br />     <ReservedLabel Undo Typing><br />     <KeySequence    '><br />     <Definition \x400>><br />     <br /><Command SmartDoubleQuote<br />     <Label Smart Double Quote><br />     <KeySequence    "><br />     <Definition \x401>><br /><br />What would happen if I deleted the .cache file?

    What's worse: I just did a global find and replace, trying to fix four dumb quotes in an entire document that I'd cut and pasted--and Pages turned every single smart quote into a dumb quote. In all 92 pages. 1,600 smart quotes dumbified. With no way for me to smarten them up again.
    Then, because I'm just as dumb as my quotes, I did the same thing with my single quotes/apostrophes.
    I know how I'll be spending my afternoon.

  • Pasting smart quotes and apostrophes in code view.

    Sine upgrading to Dreamweaver CS5, I haven't been able to copy/paste smart quotes and apostrophes into code view without them automatically being converted to straight quotes.
    For example, the following sentence (notice the curly quotes):
    John’s new song is called “DW Blues”
    would get pasted into Code View as:
    John's new song is called "DW Blues"
    Notice the smart quotes and apostrophe are replaced with single and double ticks, or "straight quotes."  While this seems like a minor detail, it's extremely important to our writers and editors to have them appear on the website exactly as typed.
    If I do the same copy/paste in Design View (doc type is XHTML Transitional), it appears as:
    John's new song is called &quot;DW Blues&quot;
    The characters are still replaced, and the straight quotes are then entity encoded (as expected).
    This doesn't happen with other valid UTF-8 characters like ™, ®, —, etc., or with any other code editors I've used, including DW CS3.
    Is there a hidden preference somewhere to disable this "feature," or is it just a bug?
    Please help!

    It's now 4 years since jsparacio posted this, and I just wanted to let everyone know that I had -- and am still having -- the exact same problem with Dreamweaver CS5 (running first under Windows XP, then Windows 7, and now again with Windows 8.1). So it's not just Macs that are affected.
    FWIW, I have set my DW CS5 Paste preferences to the 3rd of 4 options available
        1 - Text Only
        2 - Text With Structure
        3 - Text With Structure Plus Basic Formatting
        4 - Text With Structure Plus Full Formatting
    in the EDIT > PREFERENCES > Copy/Paste Preferences dialog box.
    But the Paste Special command ignores this setting, giving me only the first 2 options from which to choose, with option 2 the default selection for Paste Special operations (options 3 and 4 are grayed out, and can't be selected).
    According to David Sawyer McFarland's _Dreamweaver CS5: The Missing Manual_ (O'Reilly Media, 2010), the reason these are grayed out is because I am pasting unformatted ASCII text which I generated in a program editor called "UltraEdit":
        "... Choose EDIT > PASTE SPECIAL to open the Paste Special window. Here, you can choose which of the four techniques you wish to use ... sort of. You're limited to what Dreamweaver can paste. For non-Microsoft Office products, you can use only the first two options--the others are grayed out--whereas you can choose from any of the four with text copied from Word or Excel." (McFarland, p. 81)
    Regardless of such restrictions, standard copy-and-paste (CTRL+C followed by CTRL+V) works just fine for me using Dreamweaver CS4 (i.e., I have never needed to use the Paste Special command), but with DW CS5, neither Paste command (CONTROL+V or CTRL+SHIFT+V) works properly with typographic/curly/smart quotes.
    All typographic quotes -- ASCII-0146 and ASCII-0147 (double quote marks); plus ASCII-0145 and ASCII-0146 (single quote marks, for quotes within a quote) -- are converted to inch (&quot; is entered in the code) and foot (' is entered in the code) marks when I copy-and-paste text with these characters into Dreamweaver's Design View.
    When I copy this same plain ASCII text directly into the code (rather than using Design View), typographic double open & close quotes are converted to the inch (") mark, and typographic single open & close quotes are converted to the foot (') mark.
    The beginning of this week, I installed Dreamweaver CS5, ver. 11.0, Build 4909 under Windows 8.1 OS on my new Ultrabook. I was hoping that under Windows 8.1, DW CS5's handling of typographic quotes might improve so that I can actually use this program that I purchased 4 years ago. Alas, no such luck: I continue to have the same problem I had when I first upgraded to Dreamweaver CS5 back in August 2010 (then running under Windows XP on my desktop computer).
    Back in August 2020, when I first asked about fixes, I was told to change the Title/Encoding setting of Page Properties to "Western European" -- which I tried, but it didn't work then, and it doesn't work now ... and even if it did, it wouldn't be a proper fix for the problem as I have plenty of good reasons for wanting my HTML page Title/Encoding set to Unicode (UTF-8), not Western European ("charset=iso-8859-1").
    The ability to copy-and-paste typographic quotes is such a big deal for me that I chose back in August 2010 to revert to Dreamweaver CS4, which I've been using ever since.
    It is *very* frustrating that, 4 years later, I still can't use this program, and shall be reverting to DW CS4, yet again.
    I continue to be completely flummoxed by this. Every other program with which I am familiar converts non-typographic quotes to typographic/curly/smart quotes ... never have I seen the process automated in reverse!

  • A small but very irritating bug in Mail: after pressing the spacebar after typing an apostrophe in a word such as "we're", the cursor moves to the left i.e. backwards, and not to the right, effectively deleting a space and not creating one.

    When composing an email in Mac Mail I've noticed a small but very irritating bug: pressing the spacebar after typing an apostrophe in a word, e.g. "we're", the cursor moves to the left i.e. backwards, and not to the right, effectively deleting a space and not creating one.
    Any ideas?

    I just recreated this problem on my iMac (wired KB, no wireless KB) by changing Mail > Preferences > Composing > Spellcheck from "as I type" to "never". Then type a contraction ending in 're and the space bar causes the cursor to jump back as others have stated, to the spot 'r|e
    Next, I went into System Preferences > Keyboard > Text, and turned off "use smart quotes" and the problem went away again.
    From this point (smart quotes off, spell checking never), if I turn Smart Quotes ON, the problem returns.
    The problem is dependent on the state of both settings.
    The spacebar in Mail "works" if I have either of the following setting combinations:
    Keyboard: smart quotes OFF, Mail: check spelling ANY SETTING
    Keyboard: smart quotes ON, Mail: check spelling AS I TYPE
    Other combinations FAIL
    Keyboard: smart quotes ON, Mail: Check spelling NEVER
    Keyboard: smart quotes ON, Mail: Check Spelling WHEN I CLICK SEND
    Looks to me like there's a bug in Mail > Preferences > Check spelling > NEVER and WHEN I CLICK SEND that interacts badly with Keyboard > Smart quotes ON.
    Thanks.
    Todd Smithgall

  • Question mark instead of apostrophe

    In many webpages where there is supposed to be a apostrophe I see a blacked out question mark, as depicted below. Any ideas?
    In the central system, for example, the MX-980 can trigger sophisticated smart macros, RS232 and relay controls via a centrally installed MSC-400 Master Controller. At each local system location, the MX-980 addresses an RF Base Station, like URC�s new MRF-260, which extends the remote�s range to 50 to 100 feet, and eliminates the line-of-sight requirement. In any room with a projector, lighting switch or other IR-controlled device not connected to a central MSC-400 or local MRF, the MX-980�s built-in IR signal is effective at a range of 30 to 50 feet.

    Thanks for the reply. If, while in Safari, I click View:TextEncoding and choose Western ISO Latin 1, the fonts are normal. Choosing Unicode, Default or Western MAC OS, the fonts are not correct.
    So, I figured I'd choose Western ISO Latin 1. Problem is, when I close Safari and re-open, it's back to Default and displays the fonts incorrectly again.
    I guess I'm not sure which text encoding is proper for the United States and how to set that proper encoding as default.
    Thanks for any more help you can provide.

  • Need help with MySQL Query...Again

    Ok so I get this error when I enter "springfield" and "MA" for the city and state.
    This server program accepts either a 'zipcode' or 'city, state' depending on the choice # passed to it.
    I just need to be able to perform the query.
    Thanks!!
    java.sql.SQLException: Unknown column 'springfield' in 'where clause'
    Error4
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1695)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:3020)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2949)
         at com.mysql.jdbc.Statement.executeQuery(Statement.java:959)
         at ThreadConnect.run(ZipcodeServer.java:84)Here is my code:
    import java.sql.*;
    import java.io.*;
    import java.net.*;
    public class ZipcodeServer {
         static void runServer() {
              ServerSocket server;
              Socket connection;
              try {
                   System.out.println("Creating Server Socket " + 5000 + " . . . ");
                   server = new ServerSocket(5000);
                   System.out.println("SUCCESS!!!");
                   while (true) {
                        System.out.println("Waiting for connection.");
                        connection = server.accept();
                        System.out.println("Done");
                        ThreadConnect t = new ThreadConnect(connection);
                        t.start();
              } catch (IOException e) {
                   System.out.println("Error5");
                   e.printStackTrace();
         public static void main(String args[]) {
              ZipcodeServer.runServer();
    class ThreadConnect extends Thread {
         Socket connection;
         DataOutputStream output;
         DataInputStream input;
         ThreadConnect(Socket x) {
              connection = x;
         public void run() {
              try {
                   input = new DataInputStream(connection.getInputStream());
                   output = new DataOutputStream(connection.getOutputStream());
                   try {
                        int choice = input.readInt();
                        String city, state;
                        int zipcode;
                        if (choice == 1) {
                             int zc = input.readInt();
                             DatabaseConnection.connect();
                             DatabaseConnection.rs = DatabaseConnection.s
                                       .executeQuery("SELECT City,State FROM Zipcodes "
                                                 + "WHERE ZipCode = " + zc);
                             while (DatabaseConnection.rs.next()) {
                                  state = DatabaseConnection.rs.getString("State");
                                  output.writeUTF(state);
                                  output.flush();
                                  city = DatabaseConnection.rs.getString("City");
                                  output.writeUTF(city);
                                  output.flush();
                        } else if (choice == 2) {
                             city = input.readUTF();
                             state = input.readUTF();
                             DatabaseConnection.connect();
                             DatabaseConnection.rs = DatabaseConnection.s
                                       .executeQuery("SELECT ZipCode FROM Zipcodes "
                                                 + "WHERE City = " + city + " AND State = "
                                                 + state);
                             while (DatabaseConnection.rs.next()) {
                                  zipcode = DatabaseConnection.rs.getInt("ZipCode");
                                  output.writeInt(zipcode);
                                  output.flush();
                   } catch (Exception e) {
                        System.out.println("Error4");
                        e.printStackTrace();
                   } finally {
                        DatabaseConnection.close();
              } catch (IOException e) {
                   System.out.println("Error3");
                   e.printStackTrace();
    class DatabaseConnection {
         static Connection con;
         static Statement s;
         static ResultSet rs;
         static String driver = "com.mysql.jdbc.Driver";
         static String url = "jdbc:mysql://***.****.******/***";
         static String user = "*******";
         static String password = "********";
         static void connect() {
              try {
                   Class.forName(driver).newInstance();
                   System.out.println("Loaded Driver");
                   con = DriverManager.getConnection(url, user, password);
                   System.out.println("Connected to database\n");
                   con.setAutoCommit(false);
                   s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                             ResultSet.CONCUR_READ_ONLY);
              } catch (Throwable e) {
                   System.out.println("Error2");
                   e.printStackTrace();
         static void close() {
              try {
                   rs.close();
                   s.close();
                   con.close();
                   System.out.println("\nDisconnected From Database");
              } catch (Throwable e) {
                   System.out.println("Error1");
                   e.printStackTrace();
    }

    R.Baldwin7 wrote:
    I tried it. Still getting the same error.
    Code no looks like:
    else if (choice == 2) {
                             city = input.readUTF();
                             state = input.readUTF();
                             DatabaseConnection.connect();
                             PreparedStatement ps = DatabaseConnection.con.prepareStatement("SELECT ZipCode FROM Zipcodes "
                                       + "WHERE City = " + city + " AND State = "
                                       + state);
                             DatabaseConnection.rs = ps.executeQuery();
                             while (DatabaseConnection.rs.next()) {
                                  zipcode = DatabaseConnection.rs.getInt("ZipCode");
                                  output.writeInt(zipcode);
                                  output.flush();
    Read the API docs and the JDBC Tutorials for the proper way to use a PreparedStatement. It may "work" to add the quotes, but it is definately not the right way to do it. What happens if the city entered contains an apostrophe? Your statement will be broken again. Like I said, use a PreparedStatement and use it right.

  • Apostrophe displays incorrectly in SQL database

    MySQL, PHP, Dreamweaver CS4
    I have a SQL database that has text fields. If the user enters text that includes an apostrophe (such as the word don't or it's), when the text is displayed on the website, the apostrophe is replaced by a small box. How can I get this character to display correctly? I had contacted Adobe support directly, and they said to post the question on DEVNET. I had posted this question a month ago, but have received no answers. So I am trying again.

    The reason it's displayed as a small box is almost certainly because the user has pasted the text from a program like Word that uses "smart quotes". Depending on how your website is set up, it's likely that the smart quotes are not being encoded correctly.
    The first thing to check is that all the pages in your website use UTF-8 encoding. If that doesn't fix the problem, you will need to filter the text before inserting it into the database to replace the smart quotes with ordinary ones. I don't have a handy snippet of code to do that, so see if the encoding sorts out the problem.

  • Lightroom 2.6 Freezes - Folders with apostrophes the culprit

    Hi All,
    Thought you might be interested... anyone who may be having severe and frustrating problems with Lightroom freezing the operating system, requiring a hard reset...
    I upgraded to 2.6 and had constant freezes - as soon as I tried to import or move my mouse to the left or right of the screen, my system would lock up and I would have to reset the PC. After a series of restarts and much frustration I remembered that in an earlier version of Lightroom (can't remember which now) where you had folders in your library that contained apostrophes in the names, Lightroom had major problems. It was resolved however with some sort of subsequent release or fix. Indeed, subsequently I had two folders using apostrophes prior to upgrading to 2.6 and had no issues with Lightroom whatsoever.
    I renamed my folders removing those apostrophes and Lightroom is no longer locking the whole system and seems to be running fine. Of course I had to point Lightroom to the 'missing folders' once I'd done that. I'm running Vista 64 bit with 12 GBs RAM by the way.
    Just thought it might help anyone having the same kind of problems...

    I hope I am not speaking too soon.
    I had written you this detailed response because I was having the exact same problem, LR2.6 freezing after 5-50 minutes of use.  I have a very similar system i7 920, 12GB DDR3 RAM, x64 Windows 7.  I thought it was my RAM so I had taken 4 sticks out and was running off of just 2.  i tried to re-import my 50k image library and it froze at 11000 images.  I swapped for 2 other sticks of RAM and did the import and again froze around 11000 images.  I was thinking memory leak for sure.  Then I read your post.  I put all the memory back in and re-ran the import (expecting it to freeze around 40k images) but it did NOT.  It has been running fine for 3 days now.  So basically all I can figure I did was re-arrange the RAM because I did not put it back in the same order as it originally was.  This doesnt make sense to me.  I was watching resource monitor as the import occurred and LR grew from 500mb RAM to 2.5GB of ram but never went beyond that.
    Previously I ran Memtest86+ for 24hrs so im pretty sure my RAM is OK.
    Have you had any more freezes?  have you found a solution?
    -Paul

  • Engraving Question : Apostrophes

    For anyone that has this; are the apostrophe marks as they appear in the engraving preview on the engraving?
    I was thinking of using them in lieu of quotation marks but am a tad worried they may not work out. Tried it out on word and it looked rather odd.
    Thanks in advance.

    Hey there,
    You could get the iPod engraved again by a 3rd party engraver. Maybe cover whatever you initially engraved with a picture of some sort or something. I'm sure you could do something with it that would cover up whatever you initially had engraved.
    Message was edited by: Moderator

  • Avoiding an apostrophe

    Hi,
    in 11.2.0.3
    I ran the following :
    SQL> select 'alter database rename file '''||name||''' to ''C:\data\test\log\'''||substr(name,instr(name,'\',-1)+1)||''';' from v$tempfile
    alter database rename file 'C:\DATA\TEST\LOG\TEMP01.DBF' to 'C:\data\test\log\'TEMP01.DBF';
    But it is not good because there is an apostrophe before TEMP01 in  to 'C:\data\test\log\'TEMP01.DBF';
    I tried again but some error :
    SQL> select 'alter database rename file '''||name||''' to ''C:\data\test\log\''||substr(name,instr(name,'\',-1)+1)||'';' from v$tempfile;
    select 'alter database rename file '''||name||''' to ''C:\data\test\log\''||substr(name,instr(name,'\',-1)+1)||'';' from v$tempfile
    Error in line 1 :
    ORA-00911:
    Thanks for help.

    Try:
    select 'alter database rename file '''||name||''' to ''C:\data\test\log\'||substr(name,instr(name,'\',-1)+1)||''';' from v$tempfile;

  • Firefox crashes when the apostrophe and tilde keys are pressed

    Pressing either the apostrophe key or the tilde key is crashing Firefox. It's also happening in other internet browsers and programs (like Skype and Google Talk). I've tried a new keyboard and using different USB ports for it. The first time I tried a new USB port it temporarily fixed the problem, but after restarting my computer for updates the issue returned.
    Firefox, the plugins, add-ons and drivers are all up to date from what I can tell.

    do the crashes occur too when you run firefox in [[Safe Mode]]? (close all firefox windows & press the shift key while launching firefox again)
    probably not related - there's a new version of the flash plugin available. you can install it from [http://get.adobe.com/flashplayer/] (disable the checkbox for bundled software)

  • How to query if you have apostrophe

    how to query if you have value with apostrophe ' like o'reilly
    select * from users where name ='o'reilly'
    it throws an error
    any help is much appreciated
    thanks

    Use an 'escape' quote:
    select * from users where name ='o''reilly';
    SQL> create table t as select 'o''reilly' name from dual union select 'kyte' from dual;
    Table created.
    SQL> select * from t;
    NAME
    kyte
    o'reilly
    2 rows selected.
    SQL> select * from t where name = 'o''reilly';
    NAME
    o'reilly
    1 row selected.
    edit
    Too bad my stupid ancient PC got stuck once again... argh
    Edited by: hoek on Jul 8, 2010 8:15 PM

Maybe you are looking for