Ruby on Rails Sunday, May 1, 2011

I think I may know the answer and it isn't CSS. I use a gem called
blavosync to sync my development database with production. I just set
up a new computer this week and used MySQL Workbench to create the
empty development database prior to synching with production. In MySQL
when you create a schema, you can choose the default character
collation.

In this case I chose UTF8 -default. I checked out the production
database and it appears to use latin1_swedish_ci. If I understand
correctly, importing data from one SQL database to another and having
different character collation types, can result in weird text.

In this case, the description field for this particular model uses
textile codes for markup. Sure enough the normal "•" bullets are
showing up as "•" instead. Silly me, I just checked the tables in
the MySQL database and sure enough the bullets are screwed up.

So long answer short. It wasn't CSS, it appears to me to be a mismatch
in the default character collation between my production and
development databases and the result of importing from one to the
other.

But it was messing with CSS <li> and <ul> elements that made me
notice. Thanks for the assistance though.

On May 1, 2:33 pm, Chris Mear <chrism...@gmail.com> wrote:
> On 1 May 2011, at 18:56, sol.manager wrote:
>
> > I have been messing with my CSS sytlesheets to fix some display
> > issues. Specifically, messed with <li> and <ul> elements. Now i have
> > noticed on  a page with <li> elements in a textile editor box, that
> > the list bullet is showing up as "• " instead of "•".
>
> > I am assuming this a CSS issue and not a textile or rails issue.
> > Wondering what I need to do to fix this issue. The only bullets that
> > are jacked up are those within a div that uses textile codes.
>
> I'd start by examining the CSS rules that are being applied to those 'li's according to your browser. Fire up Firebug or Web Inspector or similar tool of your choice and inspect those elements to check the CSS rules being applied are the ones you expect.
>
> Having said that, that string of surprising characters looks a lot more like a character encoding issue mismatch than a simple CSS error. Are you using the ':before' pseudo-class with a 'content' rule to set a custom character for your lists, by any chance? If so, there could be something going on with the character encoding that you're saving your CSS file in.
>
> Chris

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment