Re: [fossil-users] "CGI" command and argc

2017-03-29 Thread Ron W
On Tue, Mar 28, 2017 at 8:00 AM, 
wrote:
>
> Date: Tue, 28 Mar 2017 09:16:35 +0200
> From: Florian Balmer 
> To: fossil-users@lists.fossil-scm.org
> Subject: [fossil-users] "CGI" command and argc
>
...

> To get Fossil 2.1 running on my FreeBSD 9.1 shared host, I downloaded
> Fossil 2.1 and the OpenSSL libraries for FreeBSD 11 from [0], and
> grabbed a copy of libc.so.7 from a FreeBSD 11 ISO image (for
> `strchrnul`). These files were saved in a separate ./fossil2
> directory, and the symlinks libcrypto.so.9 -> libcrypto.so.7 and
> libssl.so.9 -> libssl.so.7 created. Now Fossil 2.1 works fine with the
> following one-line CGI script:
>
> #!/usr/bin/env -S LD_LIBRARY_PATH=fossil2 fossil2/fossil fossil.config
>

Aside from the libraries, I think the "magic" here is that the BSD version
of env has the -S option, which tells env to do a split("\s+", string) on
the text following the -S, which, because of how #!, is the rest of the
line.

So, I would expect both of the following to work:

#!/usr/bin/env -S fossil2/fossil cgi fossil.config

#!/user/bin/env -S fossil1/fossil cgi fossil.config

Unfortunately, the -S option for env is not implemented in most Linux
distributions.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread Marc Simpson
On Wed, Mar 29, 2017 at 7:54 PM, Andy Bradford  wrote:
> Maybe one day  nvi will have UTF-8  support, but I'm not  counting on it
> any time soon. :-)

You may want to check out https://github.com/lichray/nvi2.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread Andy Bradford
Thus said The Tick on Wed, 29 Mar 2017 15:47:32 -0500:

> If I edit  the file, of course the utf-8  copyright symbol is garbled.
> Furthermore, there is no way I can insert a utf-8 character.

My editor (nvi) allows me to insert UTF-8 characters by typing the ASCII
character, then by pressing ctrl-x followed  the 2-digit value 00 (for a
null byte).

> You can copy and paste the "Peggle®" and paste it into notepad. When you 
> save the file, you will see that the "registered" character is a single 
> character with the hex value \xAE.

The problem here  is not one of ``which character  is this?'' but rather
one  of  ``which  encoding  should  be  used  to  render  the  character
visible?'' \xAE is  not ASCII. ASCII ranges from \x00  to \x7f, but only
\x20 to \x7e are ``printable'' characters.

That being said, if you want to make your browser show you the character
correctly, you need to tell your browser  that the data it is viewing is
not UTF-8 (the likely default). I added  a file to a test repostory that
had a single \xAE  character in it. Then I ran  fossil server and looked
at  the file  in my  browser. It  showed up  as a  circle with  ? inside
because  it didn't  know  what to  do  with  it. So  I  then clicked  on
View->Text  Encoding->Western and  magically, and  instantaneously, that
broken character now shows up as it should.

Andy
-- 
TAI64 timestamp: 400058dc768b


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread Andy Bradford
Thus said Warren Young on Wed, 29 Mar 2017 14:25:34 -0600:

> Any text  editor or  compiler that  can't cope with  UTF-8 in  2017 is
> broken or can be ignored.

I rarely use any editor but nvi.  It doesn't support UTF-8. Here is what
utf16le.txt (from Fossil test directory) looks like to me:

\xff\xfeT^@h^@i^@s^@ ^@f^@i^@l^@e^@ ^@c^@o^@n^@t^@a^@i^@n^@s^@ ^@u^@t^@f^@-^@1^@
6^@l^@e^@ ^@t^@e^@x^@t^@.^@

Usually when I see a file like this, I just do:

tr -d \\000 < utf16le.txt > newutf16le.txt

Then I remove any BOM that might exist because who needs it?

Now I see:

This file contains utf-16le text.

Do I  need UTF-8?  Not really.  I don't  even have  a keyboard  that can
produce any UTF-8 characters; except those which overlap with ASCII, and
even then, they are only 1 byte characters anyway.

You can claim that nvi is broken or  can be ignored, but I still use it,
and don't see a good reason to  stop using it (UTF-8 support is not high
on my list of reasons to change to a new editor). I cannot stand vim.

Maybe one day  nvi will have UTF-8  support, but I'm not  counting on it
any time soon. :-)

Andy
-- 
TAI64 timestamp: 400058dc738a


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil as an app server?

2017-03-29 Thread Joe Mistachkin

If you compile Fossil with TH1 docs & hooks support and with Tcl integration
enabled (like I compile it), it makes quite a reasonable server for running
server-side scripts written in TH1/Tcl.

--
Joe Mistachkin @ https://urn.to/r/mistachkin

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil as an app server?

2017-03-29 Thread Stephan Beal
On Thu, Mar 30, 2017 at 2:06 AM, Paul Hammant  wrote:

> I see that Fossil doesn't follow PUT/POST verbs*, but that doesn't really
> matter if the JavaScript app can craft URLs to match APIs.
>

FWIW, CGI (Fossil's typical run-mode) does not specify PUT operations:

https://tools.ietf.org/html/rfc3875#section-4.3

tl;dr: it only specifies GET, POST, and HEAD.

Fossil does support POST, but only in limited contexts (e.g. the JSON API
reads JSON via POST).

Does anyone know of an example app somewhere that shows it all work?  Like
> a "Hello World" of any JavaScript app that does at least C R and U of CRUD
> with Fossil as the backing store?
>

i used to have a fossil backend powering a custom wiki using the fossil
JSON API, using client-side javascript to render the wiki content (as
opposed to using fossil's own wiki format). Unfortunately, it was broken by
the shutdown of google code (from which it fetched some JS and CSS bits).
It only used the wiki API, in any case.

JSON API:
https://docs.google.com/document/d/1fXViveNhDbiXgCuE7QDXQOKeFzf2qNUkBEgiUvoqFN4/view

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil as an app server?

2017-03-29 Thread Paul Hammant
Or maybe examples of curl commands that can demonstrate CRUD operations
against a Fossil repo HTTP interface?
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Fossil as an app server?

2017-03-29 Thread Paul Hammant
Fossil being comfortable serving up HTML is well known.

Could I serve up (say) an AngularJS app that spoke HTTP back to the Fossil
server to effectively do CRUD operations on a JSON document at HEAD
revision?

I see that Fossil doesn't follow PUT/POST verbs*, but that doesn't really
matter if the JavaScript app can craft URLs to match APIs.

* see the bottom of
https://www.fossil-scm.org/xfer/doc/tip/www/aboutcgi.wiki

Does anyone know of an example app somewhere that shows it all work?  Like
a "Hello World" of any JavaScript app that does at least C R and U of CRUD
with Fossil as the backing store?

Thanks,

- Paul
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread Ross Berteig


On 3/29/2017 1:05 PM, The Tick wrote:

On 3/29/2017 2:36 PM, Richard Hipp wrote:

Most of the world is using UTF-8 now.


I'm wondering how that can be for programming language source files.

I managed to put the "bom" in front of a one-line tcl script:

puts "This is a copyright symbol: ©."

where the '©' was previously converted to utf-8 by fossil.

gvim now reads the file and renders the utf-8 '©' as a '©'
notepad displays the file and renders the utf-8 '©' as '©'


If a BOM encoded in UTF-8 is present, that unambiguously marks the text 
as UTF-8. But. As you note that is not always compatible with other uses 
of the file. As UTF-8 was designed to be highly compatible with ASCII, 
including the BOM is not usually recommended unless it is required for 
other reasons.


VIM seems to default out of the box to Latin1 encoding which is more 
consistent with Windows. (More correctly, it defaults to an encoding 
consistent with the current Locale, which on Windows is usually Latin1 
or another 8-bit codepage. Windows does support a UTF-8 codepage (aka 
65001) but I've never seen that set as the system default.)


You can (probably) change it to support UTF-8, but it seems to make that 
task as difficult as possible for a novice to the weird and subtle world 
of file encoding issues. My copy of VIM 8 on Win 10 Pro correctly reads 
UCS-2 (16-bit Unicode) files with BOMs, but proudly converts them to 
Latin1 for display and editing which would clearly be a bad idea if they 
had included characters from outside the coverage of the Latin1 
codepage. Copyright and a number of other non-ASCII but otherwise 
ordinary symbols are included in Latin1 and work as expected.


From my reading of the help file mbyte.txt, especially Section 10 Using 
UTF-8, you want to :set encoding utf-8 before reading the file. Your 
.vimrc might be a good place to do that. Another place to do that is to 
use a modeline in your .tcl file that tells vim to assume UTF-8. 
Something like


# vim: set enc=utf-8 fenc=utf-8

"near" the top or bottom of the file should do the trick.

The other huge caveat is that you also need to have fonts configured 
that cover enough Unicode Codepoints to be useful to you. I believe VIM 
defaults to "fixedsys" on Windows which is not a Unicode font. You will 
want to change to Lucida Console at least, if not to something even more 
programmer-friendly such as Hack[1], Source Code Pro[2], or DejaVu Sans 
Mono[3] with good Unicode coverage and other features useful to coding 
without eyestrain.


[1]: http://sourcefoundry.org/hack/
[2]: http://www.adobe.com/products/type/fonts-by-adobe.html
[3]: http://dejavu-fonts.org/

You may also want your console windows to understand UTF-8. If you have 
the console set to use an appropriate font, (I personally use Hack for 
both my consoles and my editors) then all you need to do is CHCP 65001 
at the CMD prompt to switch to the UTF-8 codepage.




>but<

$ /c/Program\ Files/tcl/bin/tclsh u.tcl
invalid command name "puts"
while executing
"puts "This is a copyright symbol: ©.""
(file "k.tcl" line 1)

While adding the option "-encoding utf-8" to the tclsh command line 
makes it work, it does not work when I double-click on the .tcl file 
as I have no way to set any sort of encoding option -- unless I have 
to make a windows shortcut for each and every .tcl file that I want to 
run and put the -encoding there.


There is a way to do this automatically. Windows uses registry keys to 
associate a file extension with a logical file type, and a file type 
with the command to "open" it. The assoc and ftype commands provide a 
simpler interface to viewing and setting the needed registry keys. For 
ActiveTcl, I have:


C:...>assoc .tcl
.tcl=ActiveTclScript

C:...>ftype ActiveTclScript
ActiveTclScript="C:\Programs\Tcl\bin\wish86.exe" "%1" %*

You can change the definition of ActiveTclScript to include -encoding utf-8

Note that would make your installation less consistent with the rest of 
the users, and is thus likely not the first choice for addressing this 
issue.



So, how can one use a program source file encoded in utf-8?


--
Ross Berteig   r...@cheshireeng.com
Cheshire Engineering Corp.   http://www.CheshireEng.com/
+1 626 303 1602

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread sky5walk
the.tick - "Where and how would I use the above?"

Browse a fossil ui of your repo and edit the skin - CSS page:
http://localhost:8082/setup_skinedit?w=0

On Wed, Mar 29, 2017 at 5:18 PM, The Tick  wrote:

> On 3/29/2017 4:03 PM, sky5w...@gmail.com wrote:
>
>> Doh! It was my CSS. I was using a test repo without my modified CSS. Now
>> it works.
>> I think this is the 2nd time I tripped on this. :(
>>
>> // from CSS //
>> /* THIS DOES NOT WORK - Enable Check-in comments to respect linefeeds. */
>> span.checkinComment {
>>   font-family: Consolas;
>>   white-space: pre;
>> }
>> /* THIS WORKS - Enable timeline comments to respect linefeeds. */
>> span.timelineComment {
>>   font-family: Consolas;
>>   white-space: pre;
>> }
>>
>
> Where and how would I use the above?
>
>
>> @the.tick - With UTF-8(±BOM) source files, I can't reproduce your
>> problem. Win10 x64, Fossil v2.1.
>>
>
> I'm on win7x64. Both Active State's Tcl 8.6.4 and a compiled 8.6.6
> (msys2's x64 gcc) barf on the 'bom' at the beginning of a .tcl source file.
> I compiled fossil from the 2.1 source I downloaded around 3/13. That
> version of fossil ignores newlines in my commit text -- I need to look into
> this markup thing.
>
> On Wed, Mar 29, 2017 at 4:04 PM, Richard Hipp > > wrote:
>>
>> On 3/29/17, sky5w...@gmail.com 
>> mailto:sky5w...@gmail.com>> wrote:
>> >
>> > Side note:
>> > I have all Timeline Display Preferences unchecked and my v2.1
>> Timeline does
>> > not respect new lines in my check-in comment?
>> > v1.37 showed newlines in the Timeline for identical setup.
>> > Is this intentional change?
>> >
>>
>> No.  Can you show us a test case?
>> --
>> D. Richard Hipp
>> d...@sqlite.org 
>>
>
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread The Tick

On 3/29/2017 4:21 PM, Martin Gagnon wrote:


About gvim and UTF-8 files without BOM, my vim is set with
  set encoding=utf-8
  set fileencoding=utf-8

and everything works like a charm.

Also, If I edit a ascii file that doesn't contain any special character,
it remain ascii.



I didn't know I could do that -- thank you! I will put that into my vimrc.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread Martin Gagnon
On Wed, Mar 29, 2017 at 03:47:32PM -0500, The Tick wrote:
> On 3/29/2017 3:04 PM, Stephan Beal wrote:
> >On Wed, Mar 29, 2017 at 9:52 PM,  >> wrote:
> >
> >Yes, change your text files to UTF-8 with BOM(unsure without BOM)
> >and Fossil respects °, ±, ©, ®, special characters.
> >
> >
> >Actually, UTF8 does not typically use a BOM because byte order is
> >meaningless with UTF8 (the standard allows a BOM but does not require it).
> >
> >https://en.wikipedia.org/wiki/Byte_order_mark
> >
> 
> I took my u.tcl file, removed the 'bom' and now both tclsh and wish work.
> 
> If I edit the file, of course the utf-8 copyright symbol is garbled.
> Furthermore, there is no way I can insert a utf-8 character.

About gvim and UTF-8 files without BOM, my vim is set with 
  set encoding=utf-8
  set fileencoding=utf-8

and everything works like a charm.

Also, If I edit a ascii file that doesn't contain any special character,
it remain ascii.

 

-- 
Martin G.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread The Tick

On 3/29/2017 4:03 PM, sky5w...@gmail.com wrote:

Doh! It was my CSS. I was using a test repo without my modified CSS. Now
it works.
I think this is the 2nd time I tripped on this. :(

// from CSS //
/* THIS DOES NOT WORK - Enable Check-in comments to respect linefeeds. */
span.checkinComment {
  font-family: Consolas;
  white-space: pre;
}
/* THIS WORKS - Enable timeline comments to respect linefeeds. */
span.timelineComment {
  font-family: Consolas;
  white-space: pre;
}


Where and how would I use the above?



@the.tick - With UTF-8(±BOM) source files, I can't reproduce your
problem. Win10 x64, Fossil v2.1.


I'm on win7x64. Both Active State's Tcl 8.6.4 and a compiled 8.6.6 
(msys2's x64 gcc) barf on the 'bom' at the beginning of a .tcl source 
file. I compiled fossil from the 2.1 source I downloaded around 3/13. 
That version of fossil ignores newlines in my commit text -- I need to 
look into this markup thing.



On Wed, Mar 29, 2017 at 4:04 PM, Richard Hipp mailto:d...@sqlite.org>> wrote:

On 3/29/17, sky5w...@gmail.com 
mailto:sky5w...@gmail.com>> wrote:
>
> Side note:
> I have all Timeline Display Preferences unchecked and my v2.1 Timeline 
does
> not respect new lines in my check-in comment?
> v1.37 showed newlines in the Timeline for identical setup.
> Is this intentional change?
>

No.  Can you show us a test case?
--
D. Richard Hipp
d...@sqlite.org 


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread sky5walk
Doh! It was my CSS. I was using a test repo without my modified CSS. Now it
works.
I think this is the 2nd time I tripped on this. :(

// from CSS //
/* THIS DOES NOT WORK - Enable Check-in comments to respect linefeeds. */
span.checkinComment {
  font-family: Consolas;
  white-space: pre;
}
/* THIS WORKS - Enable timeline comments to respect linefeeds. */
span.timelineComment {
  font-family: Consolas;
  white-space: pre;
}

@the.tick - With UTF-8(±BOM) source files, I can't reproduce your problem.
Win10 x64, Fossil v2.1.

Thanks!

On Wed, Mar 29, 2017 at 4:04 PM, Richard Hipp  wrote:

> On 3/29/17, sky5w...@gmail.com  wrote:
> >
> > Side note:
> > I have all Timeline Display Preferences unchecked and my v2.1 Timeline
> does
> > not respect new lines in my check-in comment?
> > v1.37 showed newlines in the Timeline for identical setup.
> > Is this intentional change?
> >
>
> No.  Can you show us a test case?
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread Stephan Beal
On Wed, Mar 29, 2017 at 10:47 PM, The Tick  wrote:

> I took my u.tcl file, removed the 'bom' and now both tclsh and wish work.
>

:). That reminds me of a website outage at a company i once worked for,
caused by someone's editor inserting a[n invisible] BOM in a PHP file, and
PHP crashes silently if it hits a BOM (or that version did, anyway).


> If I edit the file, of course the utf-8 copyright symbol is garbled.
> Furthermore, there is no way I can insert a utf-8 character.
>

What i normally do is google "utf8 character table" and copy/paste the ones
i want :).

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread The Tick

On 3/29/2017 3:25 PM, Warren Young wrote:

On Mar 29, 2017, at 2:05 PM, The Tick  wrote:


On 3/29/2017 2:36 PM, Richard Hipp wrote:

Most of the world is using UTF-8 now.


I'm wondering how that can be for programming language source files.







Any text editor or compiler that can’t cope with UTF-8 in 2017 is broken or can 
be ignored.


I've been using vi for 40 years so that's not going to change. I 
certainly won't revert to something as horrendous as notepad or similar.





$ /c/Program\ Files/tcl/bin/tclsh u.tcl
invalid command name "puts"
   while executing
"puts "This is a copyright symbol: ©.""
   (file "k.tcl" line 1)


That sounds like an issue you should bring up with the providers of your Tcl 
implementation.  Tcl works just fine with UTF-8 on POSIX type platforms.

Second existence proof: https://tangentsoft.com/pidp8i/artifact/79fb335f12f1f6de

(auto.def is an autosetup script, which is based on Tcl.)

It may be that your particular Tcl implementation is blindly assuming UTF-16 
because you’re running it on Windows.


Active State Tcl 8.6.4.

As much as I wish unix had supplanted windows, it's an unfortunate de 
facto standard for probably most people using desktop computers.


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread The Tick

On 3/29/2017 3:04 PM, Stephan Beal wrote:

On Wed, Mar 29, 2017 at 9:52 PM, mailto:sky5w...@gmail.com>> wrote:

Yes, change your text files to UTF-8 with BOM(unsure without BOM)
and Fossil respects °, ±, ©, ®, special characters.


Actually, UTF8 does not typically use a BOM because byte order is
meaningless with UTF8 (the standard allows a BOM but does not require it).

https://en.wikipedia.org/wiki/Byte_order_mark



I took my u.tcl file, removed the 'bom' and now both tclsh and wish work.

If I edit the file, of course the utf-8 copyright symbol is garbled. 
Furthermore, there is no way I can insert a utf-8 character.


Those other symbols that, it seems to me, are in common use such at the 
trademark and registered characters still seem to work when they appear 
in a plain text file.


F.I., look at
https://www.origin.com/usa/en-us/store/peggle/peggle/standard-edition

You can copy and paste the "Peggle®" and paste it into notepad. When you 
save the file, you will see that the "registered" character is a single 
character with the hex value \xAE.


I realize that the original html probably used the html &xxx; for that 
mark, but in a .txt file it is \xAE and it shows as the correct 
character when I look at it or edit it -- but fossil will display those 
characters as the black '?'?


I also understand that a program script or, say, C source file can use 
the utf-8 escape sequence to generate these characters when the program 
is run. That is not possible in comments tho.


It sounds like I just have to live with the "way it works". At least I 
now have a better understanding of the issues.



___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread Warren Young
On Mar 29, 2017, at 2:05 PM, The Tick  wrote:
> 
> On 3/29/2017 2:36 PM, Richard Hipp wrote:
>> Most of the world is using UTF-8 now.
> 
> I'm wondering how that can be for programming language source files.

Existence proof: https://tangentsoft.com/pidp8i/artifact/9c629c82ae71862a

All text files in that repository are either plain old ASCII or are UTF-8.

Any text editor or compiler that can’t cope with UTF-8 in 2017 is broken or can 
be ignored.  

> $ /c/Program\ Files/tcl/bin/tclsh u.tcl
> invalid command name "puts"
>while executing
> "puts "This is a copyright symbol: ©.""
>(file "k.tcl" line 1)

That sounds like an issue you should bring up with the providers of your Tcl 
implementation.  Tcl works just fine with UTF-8 on POSIX type platforms.

Second existence proof: https://tangentsoft.com/pidp8i/artifact/79fb335f12f1f6de

(auto.def is an autosetup script, which is based on Tcl.)

It may be that your particular Tcl implementation is blindly assuming UTF-16 
because you’re running it on Windows.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread Donald Griggs
Regarding " ...It needs to show as a real copyright symbol..."

As a slight aside, and if you happen to be in the U.S., the United States
used to be unusual in that we required items with reserved rights to be
marked with the copyright symbol, or, equivalently, with (c) and the year.
   In 1976, we joined most other countries in having a copyright by default
(though there are still advantages to registering a copyright officially.)

https://en.wikipedia.org/wiki/Copyright_law_of_the_United_States#Registration_procedure


I am definitely not a lawyer, so consult with your advisors if you think
there's some doubt.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread The Tick

On 3/29/2017 2:36 PM, Richard Hipp wrote:

Most of the world is using UTF-8 now.


I'm wondering how that can be for programming language source files.

I managed to put the "bom" in front of a one-line tcl script:

puts "This is a copyright symbol: ©."

where the '©' was previously converted to utf-8 by fossil.

gvim now reads the file and renders the utf-8 '©' as a '©'
notepad displays the file and renders the utf-8 '©' as '©'

>but<

$ /c/Program\ Files/tcl/bin/tclsh u.tcl
invalid command name "puts"
while executing
"puts "This is a copyright symbol: ©.""
(file "k.tcl" line 1)

While adding the option "-encoding utf-8" to the tclsh command line 
makes it work, it does not work when I double-click on the .tcl file as 
I have no way to set any sort of encoding option -- unless I have to 
make a windows shortcut for each and every .tcl file that I want to run 
and put the -encoding there.


So, how can one use a program source file encoded in utf-8?
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread Richard Hipp
On 3/29/17, sky5w...@gmail.com  wrote:
>
> Side note:
> I have all Timeline Display Preferences unchecked and my v2.1 Timeline does
> not respect new lines in my check-in comment?
> v1.37 showed newlines in the Timeline for identical setup.
> Is this intentional change?
>

No.  Can you show us a test case?
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread Stephan Beal
On Wed, Mar 29, 2017 at 9:52 PM,  wrote:

> Yes, change your text files to UTF-8 with BOM(unsure without BOM) and
> Fossil respects °, ±, ©, ®, special characters.
>
>
Actually, UTF8 does not typically use a BOM because byte order is
meaningless with UTF8 (the standard allows a BOM but does not require it).

https://en.wikipedia.org/wiki/Byte_order_mark


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread sky5walk
Yes, change your text files to UTF-8 with BOM(unsure without BOM) and
Fossil respects °, ±, ©, ®, special characters.

Side note:
I have all Timeline Display Preferences unchecked and my v2.1 Timeline does
not respect new lines in my check-in comment?
v1.37 showed newlines in the Timeline for identical setup.
Is this intentional change?

Thanks

On Wed, Mar 29, 2017 at 3:36 PM, Richard Hipp  wrote:

> On 3/29/17, The Tick  wrote:
> > 1) When I did a commit, I formatted the commit message very nicely.
> > After the commit, it's just a big blob of text. That certainly defeats
> > the purpose of making a commit message of any detail.
> >
> > What is the standard practice with this? Keeping a separate
> > "changelog.txt" where the details are listed? Now I've got another file
> > to keep accurate?
>
> The default formatting for comments is Wiki markup.  You can change
> this for each repo using the Admin/Timeline menu.
>
> Fossil users usually do not follow the Git convention of providing a
> one-line description on the check-in, followed by a blank line and
> logs of additional comments.  That just never has caught on.  You can
> do that, though.  Notice on the Admin/Timeline page the "Truncate
> Comment At First Blank Line" setting.
>
> >
> > 2) My source has a couple of characters like copyright and the
> > multiplication 'x' and I get this message from fossil:
> >
> > ./Guide.tcl contains invalid UTF-8. Use --no-warnings or the
> > "encoding-glob" setting to disable this warning.
> > Commit anyhow (a=all/c=convert/y/N)?
> >
> > I set encoding-glob to *.tcl so now the message goes away.
> >
> > I've read this:
> > http://fossil-users.fossil-scm.narkive.com/6Ci1qs0J/file-
> contains-invalid-utf-8-but-is-not-utf-8
> >
> > As that post mentioned, my © symbol remains but fossil shows the file
> > with a black ? in place of the ©.
> >
> > I use gvim and switching to a different editor is something that will
> > never happen.
>
> Fossil will use UTF-8.  So if you want Fossil to display the ©
> correctly, you'll want to insert it as UTF-8.  Apparently gvim is
> using some codepage of some kind.  So if you want © to display in
> gvim, you have to use the the appropriate codepage value.  These are
> incompatible requirements.  You have to choose one or the other.
>
> Most of the world is using UTF-8 now.
>
> >
> > I tried saying 'c' for convert and fossil made a new file with "real
> > utf-8" characters in the place of the originals.
> >
> > The copyright symbol is something that I really want in the source file
> > -- it's in a comment but that is beside the point. It needs to show as a
> > real copyright symbol when the file is edited >and< viewed. As far as I
> > know, gvim does not have a way to convert the goofy "real utf-8"
> > sequence to a copyright symbol so I cannot see the © when I edit the
> > file >nor can I insert a real utf-8 copyright symbol<. Also neither
> > notepad nor another file viewer shows the "real utf-8" copyright symbol
> > correctly in a "converted" file.
> >
> > Is there any solution to this?
> >
>
> You could use the three-character ASCII sequence "(C)" instead of the
> one-character © symbol.  Or, you can simply spell out the word
> "Copyright".  I do the latter.
>
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Couple of beginner questions

2017-03-29 Thread Richard Hipp
On 3/29/17, The Tick  wrote:
> 1) When I did a commit, I formatted the commit message very nicely.
> After the commit, it's just a big blob of text. That certainly defeats
> the purpose of making a commit message of any detail.
>
> What is the standard practice with this? Keeping a separate
> "changelog.txt" where the details are listed? Now I've got another file
> to keep accurate?

The default formatting for comments is Wiki markup.  You can change
this for each repo using the Admin/Timeline menu.

Fossil users usually do not follow the Git convention of providing a
one-line description on the check-in, followed by a blank line and
logs of additional comments.  That just never has caught on.  You can
do that, though.  Notice on the Admin/Timeline page the "Truncate
Comment At First Blank Line" setting.

>
> 2) My source has a couple of characters like copyright and the
> multiplication 'x' and I get this message from fossil:
>
> ./Guide.tcl contains invalid UTF-8. Use --no-warnings or the
> "encoding-glob" setting to disable this warning.
> Commit anyhow (a=all/c=convert/y/N)?
>
> I set encoding-glob to *.tcl so now the message goes away.
>
> I've read this:
> http://fossil-users.fossil-scm.narkive.com/6Ci1qs0J/file-contains-invalid-utf-8-but-is-not-utf-8
>
> As that post mentioned, my © symbol remains but fossil shows the file
> with a black ? in place of the ©.
>
> I use gvim and switching to a different editor is something that will
> never happen.

Fossil will use UTF-8.  So if you want Fossil to display the ©
correctly, you'll want to insert it as UTF-8.  Apparently gvim is
using some codepage of some kind.  So if you want © to display in
gvim, you have to use the the appropriate codepage value.  These are
incompatible requirements.  You have to choose one or the other.

Most of the world is using UTF-8 now.

>
> I tried saying 'c' for convert and fossil made a new file with "real
> utf-8" characters in the place of the originals.
>
> The copyright symbol is something that I really want in the source file
> -- it's in a comment but that is beside the point. It needs to show as a
> real copyright symbol when the file is edited >and< viewed. As far as I
> know, gvim does not have a way to convert the goofy "real utf-8"
> sequence to a copyright symbol so I cannot see the © when I edit the
> file >nor can I insert a real utf-8 copyright symbol<. Also neither
> notepad nor another file viewer shows the "real utf-8" copyright symbol
> correctly in a "converted" file.
>
> Is there any solution to this?
>

You could use the three-character ASCII sequence "(C)" instead of the
one-character © symbol.  Or, you can simply spell out the word
"Copyright".  I do the latter.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Couple of beginner questions

2017-03-29 Thread The Tick
1) When I did a commit, I formatted the commit message very nicely. 
After the commit, it's just a big blob of text. That certainly defeats 
the purpose of making a commit message of any detail.


What is the standard practice with this? Keeping a separate 
"changelog.txt" where the details are listed? Now I've got another file 
to keep accurate?


2) My source has a couple of characters like copyright and the 
multiplication 'x' and I get this message from fossil:


./Guide.tcl contains invalid UTF-8. Use --no-warnings or the 
"encoding-glob" setting to disable this warning.

Commit anyhow (a=all/c=convert/y/N)?

I set encoding-glob to *.tcl so now the message goes away.

I've read this: 
http://fossil-users.fossil-scm.narkive.com/6Ci1qs0J/file-contains-invalid-utf-8-but-is-not-utf-8


As that post mentioned, my © symbol remains but fossil shows the file 
with a black ? in place of the ©.


I use gvim and switching to a different editor is something that will 
never happen.


I tried saying 'c' for convert and fossil made a new file with "real 
utf-8" characters in the place of the originals.


The copyright symbol is something that I really want in the source file 
-- it's in a comment but that is beside the point. It needs to show as a 
real copyright symbol when the file is edited >and< viewed. As far as I 
know, gvim does not have a way to convert the goofy "real utf-8" 
sequence to a copyright symbol so I cannot see the © when I edit the 
file >nor can I insert a real utf-8 copyright symbol<. Also neither 
notepad nor another file viewer shows the "real utf-8" copyright symbol 
correctly in a "converted" file.


Is there any solution to this?

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] update Fossil performance chart?

2017-03-29 Thread Scott Robison
On Wed, Mar 29, 2017 at 9:46 AM, jungle Boogie  wrote:
> On 28 February 2017 at 08:04, jungle Boogie  wrote:
>> Hi All,
>>
>> This is most likely a request only Dr. Hipp can fulfill has he has
>> access to all the databases.
>>
>> Is it possible for this chart to be updated?
>> https://www.fossil-scm.org/index.html/doc/trunk/www/stats.wiki
>
> That chart is now two years and a month out of date. Can it be updated?

I started to update the wiki page myself, but as I don't have access
to the th3 repository, I can't update it. However, I did gather the
rest of the information, so here it is:

project #artifacts #checkins duration  uncompsz  reposz
ratio clonebw
sqlite  70,32518,5296,149 4,857,934,127  62,996,480
77:1  50,099,900
tcl151,06320,5636,944 7,269,055,159 206,233,600
35:1 134,189,804
fossil  36,65410,5083,540 3,344,624,100  39,493,632
84:1  25,687,806
slt  2,358   1613,043 2,120,447,782 145,661,952
14:1 143,053,938
SQLite Docs  7,567 2,3393,426   290,092,771  13,713,408
21:1  10,797,106
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] update Fossil performance chart?

2017-03-29 Thread jungle Boogie
On 28 February 2017 at 08:04, jungle Boogie  wrote:
> Hi All,
>
> This is most likely a request only Dr. Hipp can fulfill has he has
> access to all the databases.
>
> Is it possible for this chart to be updated?
> https://www.fossil-scm.org/index.html/doc/trunk/www/stats.wiki

That chart is now two years and a month out of date. Can it be updated?

>
> It was last updated two years ago to the day.
>
> Fossil will be ten years old this year! Let's celebrate with Fossil 2.0.

Already done! We're moving to 2.2!

>
> Thanks!
>
> --
> ---
> inum: 883510009027723
> sip: jungleboo...@sip2sip.info
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Command-line output format

2017-03-29 Thread Warren Young
On Mar 29, 2017, at 8:40 AM, Warren Young  wrote:
> 
>   https://unix.stackexchange.com/questions/

Oops, over-edited that URL:

https://unix.stackexchange.com/questions/121718/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Command-line output format

2017-03-29 Thread Warren Young
On Mar 28, 2017, at 1:16 AM, Florian Balmer  wrote:
> 
> parsing JSON from shell scripts or Windows
> batch files seems not so trivial.

We have no lack of options for JSON parsing on POSIX type systems:

   https://unix.stackexchange.com/questions/

The top option, jq, is available for Windows:

https://stedolan.github.io/jq/

There are many other ways to skin that cat, including this method under 
PowerShell:


https://blogs.technet.microsoft.com/heyscriptingguy/2015/10/08/playing-with-json-and-powershell/

A format like JSON makes all kinds of sense from a reliable parsing standpoint. 
 Parseable plain text is fine, but prone to breakage.  Formats like JSON tend 
to be more robust.

JSON is nice in its own right, and little extra work has to go into making it 
present by default, but if JSON is deemed unsuitable for some reason, there are 
other self-documenting data languages we could use instead: XML, YAML, TOML, 
etc.

Let’s just not use EDI, okay? :)

> I would like to vote for the command-line output to remain
> as stable as possible, make the suggested "fixed-output-format" the
> default, and carefully document modifications to the command-line
> output format in the Fossil change logs.

It’s a nice sentiment, but over here on the Unix side of things, we can list 
example after example culled from decades of experience warning about relying 
on file formats and command output formats to remain stable over long periods 
of time.

e.g. getent(1) and getpwent(3) are better than parsing /etc/passwd, and 
opendir(3)/stat(2) are better than parsing the output of ls(1).

Applying those lessons to Fossil, maybe someone interested in this, such as 
yourself, would like to help out with the libfossil project?

http://fossil.wanderinghorse.net/repos/libfossil/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] "CGI" command and argc

2017-03-29 Thread Warren Young
On Mar 28, 2017, at 1:16 AM, Florian Balmer  wrote:
> 
> #!./fossil cgi fossil.config

That relies on behavior POSIX hasn’t specified:

https://stackoverflow.com/questions/4303128/

What’s wrong with doing it the portable way?

 #!/bin/sh
 exec ./fossil cgi fossil.config

I’ll grant that it’s slightly inefficient, but if you were worried about that, 
you wouldn’t be using CGI, right?

But if you actually do care about efficiency, perhaps one of the efficient 
methods of serving Fossil via HTTP would indirectly solve your current problem: 
“fossil server” directly, “fossil server” behind an HTTP[S] proxy, and SCGI are 
faster than plain old CGI.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users