Re: transliterate into cyrillic

2011-03-13 Thread Robert A. Rosenberg
At 04:05 PM + on 03/12/2011, John Delacour wrote about Re: 
transliterate into cyrillic:


At some point it is likely that an attempt was made to convert 
something to utf-8 and the raw bytes of the supposed utf-8 were then 
converted to decimal html entities where they were outside the range 
of iso-8859-1


Anything that is in UTF-8 has each byte between x00-7F if it is 
US-ASCII or xC0 or above followed by one or more characters in the 
x80-BF range. The number of characters in the UTF-8 string is based 
on the number of 1 bits at the start of the first character before 
you get to a 0 bit (thus 110x is 2 bytes [1 following character], 
1110 is 3 bytes [2 following characters], etc.) All following 
characters are of the form 10xx (so if you find one, you look 
left until you find one that is of the form 11xx which is a start 
character). Details are at http://en.wikipedia.org/wiki/Utf8.


As to the mangling issue, the codes do not match something converted 
into UTF-8. For real Unicode Cyrillic (like the good sample in the 
1000 range here is the breakdown:


Cyrillic is from Ѐ to ԯ as Unicode. This corresponds to
Ѐ to Ô&xAF; when UTF-8 encoded.

The numbers are off for real UTF-8, even if the two bytes are merged into one.

--
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.

Follow @bbedit on Twitter: 


Re: Attaching a CSS style sheet to a new HTML doc.

2011-03-13 Thread Alan Austin
Thanks so much, appreciate it.

Alan

On Sat, Mar 12, 2011 at 4:19 PM, Kendall Conrad  wrote:

> You can reference the file in a relative or absolute manner.
>
> Relative is the file path based on where the HTML file is located. The
> below code assumes you have a folder named css in the same folder as
> the HTML file that's referencing the CSS file.
> 
>
> Absolute is based on the root of the web site. The below assumes you
> have a folder named css at the top level of your site.
> 
>
> If you're testing locally (without a local web server) then the
> absolute won't work locally, but will once uploaded. Relative will
> work in both instances, but can be more maintenance down the road if
> you start moving folders/files around.
>
> -Kendall
>
>
> On Mar 12, 6:45 pm, Maxclev  wrote:
> > I'm a recent newcomer to BBEdit and am having trouble getting my
> > external.css style sheet attached to the main HTML document.  Could
> > someone tell me what the correct  syntax is
> > to accomplish that?
> >
> > Thanks,
> >
> > Maxclev
>
> --
> You received this message because you are subscribed to the
> "BBEdit Talk" discussion group on Google Groups.
> To post to this group, send email to bbedit@googlegroups.com
> To unsubscribe from this group, send email to
> bbedit+unsubscr...@googlegroups.com
> For more options, visit this group at
> 
> If you have a feature request or would like to report a problem,
> please email "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: 
>

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 


Re: Attaching a CSS style sheet to a new HTML doc.

2011-03-13 Thread Robert Huttinger
then there are different stylesheets for different reasons:

for all browsers

ex: div.info { background: transparent url('badkitty.png') no-repeat 0 
0; }

for printing the pages

ex: div.info { background-color: transparent; }

for mobile

ex: div.info { background: transparent url('badkitty.png') no-repeat 0 
0; display:block; width:320px;}

All 3 can be declared on the same page.

You can go further by having the css be an actual php page:


you can then mask the fact it is a PHP page by using .htaccess to redirect 
requests to directory 'css'

RewriteEngine On
RewriteRule css/(.*)\.(css) /css/$1.php

now any request coming in looking for style.css will actually get style.php 
which is a dynamic CSS stylesheet

whew.. ok there is a lot there in a short space, and I omitting a lot for the 
sake of time and space, but there are some ideas for you to work with!

cheers.bo


On Mar 13, 2011, at 10:03 AM, RobS wrote:

> On Mar 12, 9:19 pm, Kendall Conrad  wrote:
>> Absolute is based on the root of the web site. The below assumes you
>> have a folder named css at the top level of your site.
>> 
> 
> That would only be true if there was just one "layer" in the site. The
> OP may need to reference it absolutely as
> , or even
> , depending on
> how deep the folders go. (I manage a large complex site which uses
> just this method. It's easy to maintain.)
> 
> Rob
> 
> -- 
> You received this message because you are subscribed to the 
> "BBEdit Talk" discussion group on Google Groups.
> To post to this group, send email to bbedit@googlegroups.com
> To unsubscribe from this group, send email to
> bbedit+unsubscr...@googlegroups.com
> For more options, visit this group at
> 
> If you have a feature request or would like to report a problem, 
> please email "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: 

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 


Re: Attaching a CSS style sheet to a new HTML doc.

2011-03-13 Thread Kendall Conrad
The examples you give are relative paths, not absolute. Absolute path
is define as, "The complete path to a resource, independent of the
location of the visited page." (src: 
http://webmaster.multimania.co.uk/glossary/)


On Mar 13, 9:03 am, RobS  wrote:
> On Mar 12, 9:19 pm, Kendall Conrad  wrote:
>
> > Absolute is based on the root of the web site. The below assumes you
> > have a folder named css at the top level of your site.
> > 
>
> That would only be true if there was just one "layer" in the site. The
> OP may need to reference it absolutely as
> , or even
> , depending on
> how deep the folders go. (I manage a large complex site which uses
> just this method. It's easy to maintain.)
>
> Rob

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 


Re: Range operations?

2011-03-13 Thread Steve Samuels
Mark, your original question was how to select  all text from the
cursor up to the _line_ that
contains specified text. Here are solutions.

Exclude the line from the selection: (?s).+?(?=((?-s)^.*HELLO.*$))
Include the line in the selection:   (?s).+?((?-s)^.*HELLO.*$)

These will fail if the current line contains the text.

Steve

On Mar 10, 5:39 pm, Steve Samuels  wrote:
> You are welcome, Mark. To give you a head start, with manual
> references:
>
> "(?s)" extends the search over line endings (p. 188)
>
> ".+?HELLO" searches text up through the first occurrence of HELLO (non-
> greedy matching, p. 177)
>
> "(?=HELLO)" says to search up to "HELLO" but not include "HELLO" in
> the found text (positive lookahead, pp. 187,190).
>
> Parentheses around "HELLO" are a stylistic choice and don't affect
> this search, though they might be important in other, more complicated
> searches.
>
> Steve
>
> On Mar 10, 2:49 pm, Simdude  wrote:
>
> > Wow. Thanks Steve. I have to give this a try as soon as I get home.
> > And I guess it's time to dig into the BBedit docs some more!
>
> > On Mar 10, 2:35 pm, Steve Samuels  wrote:
>
> > > Searching for  "(?s).+?(HELLO)" will select all text from the cursor
> > > up through the first "HELLO" and "(?s).+?(?=HELLO)" will select all
> > > text up to first "HELLO">.
>
> > > Steve
>
> > > On Mar 10, 8:35 am, Simdude  wrote:
>
> > > > Thanks Chris. I did know about the selection operations but when you
> > > > have to do this repeatedly in a file, it's not as efficient. Scripting
> > > > is probably a better option but I'll have to improve my Applescript
> > > > skills to be able to do this faster.
>
> > > > For any Barebones guys, adding something like to to a future BBedit
> > > > would be a killer feature. With the help of some books, I've used vi
> > > > to rearrange sections of large documents by using commands like this
> > > > to find and move sections.  The problem is while you can do this with
> > > > a single line in vi, it can take 30 minutes to figure out what to type
> > > > in that line!
>
> > > > Mark
>
> > > > On Mar 9, 5:26 pm, Christopher Stone 
> > > > wrote:
>
> > > > > On Mar 09, 2011, at 10:28, Simdude wrote:> Is there a way in BBedit 
> > > > > to operate on ranges of data? For example, when I use vi, if I want 
> > > > > to do a search and replace on all text from my current cursor to the 
> > > > > line that contains "HELLO", I would do this:
>
> > > > > > :.,/HELLO/ s/this/that/g
>
> > > > > > Can BBedit do this sort of range stuff?
>
> > > > > __
>
> > > > > Hey Mark,
>
> > > > > Not directly.  But you can script that kind of search, or you can 
> > > > > find/replace in the current selection.  So you could find + 'extend 
> > > > > selection' to select your range and then find/replace *within* the 
> > > > > range.
>
> > > > > --
> > > > > Best Regards,
> > > > > Chris

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 


Re: Range operations?

2011-03-13 Thread Steve Samuels
Mark,  your original question was how to select up to the _line_ that
contained "HELLO".  Here  is  a solution.

Exclude the line from the selection: (?s).+?(?=((?-s)^.*HELLO.*$))

Include the line in the selection:   (?s).+?((?-s)^.*HELLO.*$)

Steve

On Mar 10, 5:39 pm, Steve Samuels  wrote:
> You are welcome, Mark. To give you a head start, with manual
> references:
>
> "(?s)" extends the search over line endings (p. 188)
>
> ".+?HELLO" searches text up through the first occurrence of HELLO (non-
> greedy matching, p. 177)
>
> "(?=HELLO)" says to search up to "HELLO" but not include "HELLO" in
> the found text (positive lookahead, pp. 187,190).
>
> Parentheses around "HELLO" are a stylistic choice and don't affect
> this search, though they might be important in other, more complicated
> searches.
>
> Steve
>
> On Mar 10, 2:49 pm, Simdude  wrote:
>
> > Wow. Thanks Steve. I have to give this a try as soon as I get home.
> > And I guess it's time to dig into the BBedit docs some more!
>
> > On Mar 10, 2:35 pm, Steve Samuels  wrote:
>
> > > Searching for  "(?s).+?(HELLO)" will select all text from the cursor
> > > up through the first "HELLO" and "(?s).+?(?=HELLO)" will select all
> > > text up to first "HELLO">.
>
> > > Steve
>
> > > On Mar 10, 8:35 am, Simdude  wrote:
>
> > > > Thanks Chris. I did know about the selection operations but when you
> > > > have to do this repeatedly in a file, it's not as efficient. Scripting
> > > > is probably a better option but I'll have to improve my Applescript
> > > > skills to be able to do this faster.
>
> > > > For any Barebones guys, adding something like to to a future BBedit
> > > > would be a killer feature. With the help of some books, I've used vi
> > > > to rearrange sections of large documents by using commands like this
> > > > to find and move sections.  The problem is while you can do this with
> > > > a single line in vi, it can take 30 minutes to figure out what to type
> > > > in that line!
>
> > > > Mark
>
> > > > On Mar 9, 5:26 pm, Christopher Stone 
> > > > wrote:
>
> > > > > On Mar 09, 2011, at 10:28, Simdude wrote:> Is there a way in BBedit 
> > > > > to operate on ranges of data? For example, when I use vi, if I want 
> > > > > to do a search and replace on all text from my current cursor to the 
> > > > > line that contains "HELLO", I would do this:
>
> > > > > > :.,/HELLO/ s/this/that/g
>
> > > > > > Can BBedit do this sort of range stuff?
>
> > > > > __
>
> > > > > Hey Mark,
>
> > > > > Not directly.  But you can script that kind of search, or you can 
> > > > > find/replace in the current selection.  So you could find + 'extend 
> > > > > selection' to select your range and then find/replace *within* the 
> > > > > range.
>
> > > > > --
> > > > > Best Regards,
> > > > > Chris

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 


Re: Attaching a CSS style sheet to a new HTML doc.

2011-03-13 Thread RobS
On Mar 12, 9:19 pm, Kendall Conrad  wrote:
> Absolute is based on the root of the web site. The below assumes you
> have a folder named css at the top level of your site.
> 

That would only be true if there was just one "layer" in the site. The
OP may need to reference it absolutely as
, or even
, depending on
how deep the folders go. (I manage a large complex site which uses
just this method. It's easy to maintain.)

Rob

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: