
201 Cal.App.3d 1061 (1988)
247 Cal. Rptr. 647
THE PEOPLE, Petitioner,
v.
THE SUPERIOR COURT OF FRESNO COUNTY, Respondent; RICHARD ELDER et al., Real Parties in Interest.
Docket No. F009407.
Court of Appeals of California, Fifth District.
June 3, 1988.
*1063 COUNSEL
John K. Van de Kamp, Attorney General, Steve White, Chief Assistant Attorney General, W. Scott Thorpe and Edgar A. Kerry, Deputy Attorneys General, for Petitioner.
No appearance for Respondent.
Calvert & Milrod and Cynthia Calvert for Real Parties in Interest.
Daniel Yamshon as Amicus Curiae on behalf of Real Parties in Interest.
OPINION
WOOLPERT, Acting P.J.
We are asked to review an order of the superior court granting mandamus relief which protected the real parties in interest *1064 from prosecution under Penal Code[1] section 597b[2] as "spectators" at a cockfight. Despite an apparently long history of unchallenged enforcement of the subject statute, the superior court agreed with the contention of the real parties in interest that the word "spectator" was impermissibly vague; it could be construed to criminalize innocent presence at a cockfight as well as purposeful attendance. We agree that facially the relevant portion of section 597b is not sufficiently certain for due process concerns. However, the analysis does not stop there. As explained below, we find a fair and reasonable construction of the relevant portion of section 597b prohibits a person from being knowingly present as a spectator at such fighting or worrying of an animal for the purpose of watching such fighting or worrying.
On July 24, 1986, petitioner filed a first amended complaint in the Fowler Justice Court alleging, in relevant part:
"COUNT ONE
"VIOLATION OF SECTION 597(b) [sic] OF THE PENAL CODE, a misdemeanor. The [real parties in interest], on or about June 14, 1986, did willfully and unlawfully aid, abet, and be present, as a spectator, at the fighting and worrying of cocks with like kind and different kind of animal and creature." Real parties in interest unsuccessfully demurred to the charge on the grounds section 597b criminally sanctioned conduct which was constitutionally protected, that is, being a spectator. Thereafter, real parties in interest petitioned the superior court to mandate that the justice court sustain the demurrer and dismiss the charges brought under section 597b.
Following briefing and a hearing on the matter, the superior court issued the following order: "Petitioners are correct in stating that neither mere presence at the scene of a crime, if such presence does not itself assist commission of the crime, nor mere knowledge that the crime is being committed and the defendants' failure to prevent it, is not, in and of itself, a crime. See CALJIC 3.01, 1984 Rev.; In re Michael T. (1979) 84 Cal. App.3d 907 [149 Cal. Rptr. 87].
*1065 "Further, if one examines the word `spectator' as set forth in the statute, he/she will not be put on notice as to what conduct is criminal. That is, if one were to merely pass by and look upon the activity, he/she could arguably be subject to criminal prosecution. Such a definition and application violate the notion of fair notice and due process. See Connally v. General Construction Co. (1926) 269 U.S. 385 [70 L.Ed. 322, 46 S.Ct. 126].
"This meaning is reinforced by a review of WEBSTER'S NEW UNIVERSAL UNABRIDGED DICTIONARY which defines `spectator' as follows: `... one who looks on; one who sees or beholds a given thing or event without taking an active part. ...' (Italics added.)
"Thus, the term as used in the statute appears to require mere presence without any active participation by a person witnessing a cockfight.
"For the reasons set forth on the record at hearing, the writ of mandate is granted to the extent of deleting the unconstitutional portion of Penal Code section 597 relating to being a mere `specator [sic].'"
Arguing the disputed language of section 597b is not unconstitutionally vague but rather provides fair notice of what constitutes criminal conduct, petitioner seeks review of the superior court's order. The petition also raises the issue of whether the People are entitled to writ review of the order.

DISCUSSION

I. Reviewability
This court requested briefing concerning whether the People were entitled to writ review of the superior court's order. We cited People v. Drake (1977) 19 Cal.3d 749 [139 Cal. Rptr. 720, 566 P.2d 622]. (1) Drake recognized section 1238, which restricts the People's right to appeal in criminal cases, is not merely a procedural limitation allocating appellate review between direct appeals and extraordinary writs. It is a substantive limitation on review of trial court determinations in criminal trials. (Id. at p. 758, citing People v. Superior Court (Howard) (1968) 69 Cal.2d 491, 498 [72 Cal. Rptr. 330, 446 P.2d 138].)
As real parties in interest observe, the superior court has struck only a portion of section 597b, in effect ordering the justice court to sustain the demurrer on the "spectator" allegation. The real parties in interest remain charged on an aiding and abetting theory under section 597b. (2) However, the People's ability to appeal with regard to a ruling on demurrer is limited to those cases where there is a "judgment for the defendant on a *1066 demurrer to the indictment, accusation, or information." (§ 1238, subd. (a)(2); italics added.)
In People v. Rehman (1964) 62 Cal.2d 135 [41 Cal. Rptr. 457, 396 P.2d 913], the court held an order sustaining a demurrer which did not result in a judgment was not the equivalent of a judgment, for appellate purposes. To permit otherwise would not carry out the intent of the Legislature in using the word "order" in section 1238, subdivision (1),[3] and the word "judgment" in subdivision (2). (3) Accordingly, real parties in interest in this action argue the prosecution may not obtain appellate relief unauthorized by the Legislature by substituting a pretrial mandamus petition as its appellate method.
Real parties in interest, however, fail to take account of a line of cases starting with People v. Yoshimura (1976) 62 Cal. App.3d 410 [133 Cal. Rptr. 228], in which some appellate courts have afforded writ review of an order sustaining a demurrer to a single count. In Yoshimura, the People purportedly appealed from the order sustaining such a demurrer.[4] The appellate court dismissed the appeal consistent with section 1238. However, it suggested the prosecution should seek reconsideration from the trial court or, if necessary, a writ from the appellate court. (Id. at pp. 412-413.) After unsuccessfully seeking reconsideration, the People filed a mandamus petition which the appellate court ultimately granted. (Id. at p. 416.) Notably, the Yoshimura court did not discuss its reasoning for permitting writ review. Nevertheless, a petition for hearing in Yoshimura by the California Supreme Court was subsequently denied. (Id. at p. 416.)
Since then the appellate courts in People v. Superior Court (Jennings) (1986) 183 Cal. App.3d 636, 640 [228 Cal. Rptr. 357], People v. Superior Court (Kizer) (1984) 155 Cal. App.3d 932, 935 [204 Cal. Rptr. 179], People v. Superior Court (Colbert) (1978) 78 Cal. App.3d 1023, 1026 [144 Cal. Rptr. 599], have permitted writ review of orders sustaining demurrers.
The Jennings court merely cited Yoshimura, Kizer and Colbert, and stated the People properly filed a petition for extraordinary relief. The Kizer court observed, without explanation: "The Legislature has indicated its intention to give the People a right to appellate review of a trial court decision on a demurrer. (Compare People v. Drake (1977) 19 Cal.3d 749, *1067 758 [139 Cal. Rptr. 720, 566 P.2d 622].)" (Kizer, supra, at p. 935.) In both Jennings and Kizer, petitions for hearing were also denied. (Jennings, supra, 183 Cal. App.3d at p. 648; Kizer, supra, 155 Cal. App.3d at p. 936.)
The Colbert court similarly concluded writ review was available. It reasoned the trial court had sustained the demurrer to a special circumstance allegation on grounds unrelated to any opinion as to guilt or innocence before jeopardy had attached. It also noted the appellate court held in People v. Superior Court (Brodie) (1975) 48 Cal. App.3d 195, 198-201 [121 Cal. Rptr. 732], writ review was available to the People where the trial court struck a special circumstance allegation before trial.
In Brodie, the appellate court discussed in some detail People v. Superior Court (Howard), supra, 69 Cal.2d 491, cited by the court in Drake, supra. It was in Howard that the state Supreme Court first held the restriction on the People's right to appeal was not merely a procedural limitation allocating appellate review between direct appeals and extraordinary writs, but was a substantive limitation on review. (Howard, supra, at p. 498.)
The Brodie court analyzed Howard and determined the People were not denied resort to an extraordinary writ under all circumstances. (Brodie, supra, 48 Cal. App.3d at p. 200.)
"In the Howard case, the trial judge had dismissed an information on his own motion after the jury had returned a verdict of guilty. The People sought a writ of mandate to set aside the trial court's order of dismissal. In denying the People's application for relief the Supreme Court said: `To permit the People to resort to an extraordinary writ to review where there is no right to appeal would be to give the People the very appeal which the Legislature has denied to them.' (69 Cal.2d at p. 499.)
"After analyzing the prior decisional law, the Howard opinion stated: `... Appellate review at the request of the People necessarily imposes substantial burdens on an accused, and the extent to which such burdens should be imposed to review claimed errors involves a delicate balancing of the competing considerations of preventing harassment of the accused as against correcting possible errors.
"`Assuming that in some cases the matter may be of such importance that mandate may be available to the People to review determinations where appeal does not lie, we are satisfied that the proper balancing of these considerations prohibits review by mandate at the request of the People where, as here, there is a danger of further trial or retrial.' (69 Cal.2d at p. 501.)
*1068 "Immediately following that passage the court disapproved two Court of Appeal decisions `which permitted the issuance of mandate where there was a danger of retrial.'" (Brodie, supra, at p. 199.)
The Brodie court also relied on People v. Superior Court (Edmonds) (1971) 4 Cal.3d 605 [94 Cal. Rptr. 250, 483 P.2d 1202], in which the court granted a People's writ to require the trial court to set aside its order permitting the defendant to renew, at trial, a pretrial suppression motion. In Edmonds the trial court had no jurisdiction over the subject matter of the defendant's renewed motion to suppress. In addition, since the court granted defendant's motion at the close of trial but before judgment was entered, there was no danger of further trial or retrial if the trial court's order were set aside. (Edmonds, supra, 4 Cal.3d at p. 609.)
Returning to Brodie, that court found: "... The Howard case is different from the present case in two important respects: first, in Howard the order of dismissal was made after the case had been tried; here the order to be reviewed was made before jeopardy had attached. Second, the ruling in Howard involved the issue of guilt, the trial judge having made his order of dismissal because he felt the defendant was entitled to an acquittal; here the order involved the trial court's interpretation of a statute, unrelated to any opinion as to guilt or innocence.
".... .... .... .... ....
"... When a trial judge strikes out [a special circumstance] allegation solely because of a misinterpretation of the statute, its order is in excess of its jurisdiction. (See Howard, supra, 69 Cal.2d at p. 500.) In the case at bench, considering the gravity of the charge, the importance of the issue and the absence of any showing of prejudice by the delay involved in the review procedure, a weighing of the factors referred to in the Howard opinion does not preclude review by this mandate proceeding." (Brodie, supra, 48 Cal. App.3d at pp. 200-201.)
In the present case, we cannot say the superior court acted in excess of its jurisdiction in considering the constitutionality of section 597b. Petitioner nevertheless contends the superior court exceeded its jurisdiction by failing to properly interpret or follow the law. The People cite In re Richard C. (1979) 89 Cal. App.3d 477, 484 [152 Cal. Rptr. 787], in which the appellate court reviewed an order granting rehearing of a suppression motion.
Interestingly, one of the cases to which Richard C. referred on this point was Brodie. Upon review of Richard C., it appears the People take the remark concerning excess of jurisdiction out of context. The relevant *1069 question is whether the trial court failed to properly interpret or follow the law defining its jurisdiction, not whether the court incorrectly interpreted the law on the merits of the issue raised. Thus, an order sustaining a demurrer, or more precisely in this case, directing the justice court to sustain the demurrer, is not in excess of the superior court's jurisdiction.
In light of Yoshimura, Jennings, Kizer, and Brodie, however, it appears the determining factor is no longer whether the trial court acted in excess of jurisdiction. Instead, at least with People's petitions for writ review of orders sustaining demurrers, the focus is on balancing the prevention of harassing the accused, as against correcting possible errors. (Howard, supra, 69 Cal.2d at p. 501.) At the pretrial stage there can be little, if any, risk of harassment to the accused since there is no danger of further trial or retrial. The opportunity for correcting possible errors is also great in such a situation. Moreover, in this particular case, as in Yoshimura, where a court has found a provision unconstitutional, there is otherwise no opportunity to consider the propriety of that finding without writ review. (See § 1238.)
We conclude, therefore, the People are entitled to writ review in this case.

II. Constitutionality of Section 597b
(4a) Due process requires a statute be definite enough to provide a standard of conduct for those whose activities are proscribed and a standard for police enforcement and ascertainment of guilt. (Burg v. Municipal Court (1983) 35 Cal.3d 257, 269 [198 Cal. Rptr. 145, 673 P.2d 732].) (5a) In this case real parties urged, and the superior court agreed, section 597b, specifically the language, "any person who ... is present at such fighting ... as a spectator," did not provide fair notice of what conduct was criminal.
(4b) "`Fair notice' requires only that a violation be described with a `"reasonable degree of certainty"' (People v. Mirmirani [1981] 30 Cal.3d 375, 382 [178 Cal. Rptr. 792, 636 P.2d 1130]) so that `ordinary people can understand what conduct is prohibited.' (Kolender v. Lawson [1983] 461 U.S. 352, 357 [75 L.Ed.2d 903, 909, 103 S.Ct. 1855, 1858].) The notice provided must be such that prosecution does not `trap the innocent' without `fair warning.' (Grayned v. City of Rockford (1972) 408 U.S. 104, 108 [33 L.Ed.2d 222, 227, 92 S.Ct. 2294].)" (Burg, supra, at pp. 270-271.)
(5b) The superior court determined the relevant portion of section 597b could be interpreted to proscribe mere presence without any active participation by a person witnessing a cockfight. The People contend the disputed language requires more for criminal conduct, namely: the person be present *1070 and "participate" as a spectator, at a cockfight or worrying of a cock, which event is for the amusement or gain of the person causing the fight or the worrying or injuring of the cock. Thus, the People argue the relevant portion of section 597b is not unconstitutionally vague.
To analyze the relevant portion of section 597b, we look first to the language itself, second to the legislative history, third to the case law, and last, to canons of statutory construction.

A.
(6) "Spectator" is not a technical, legal term, but rather a word of common usage. (Pryor v. Municipal Court (1979) 25 Cal.3d 238, 246 [158 Cal. Rptr. 330, 599 P.2d 636].) Dictionary definitions of the word include "1. One who attends and views a show, sports event, or the like. 2. An observer of an event; eyewitness; onlooker" (The American Heritage Dict. (New College Ed. 1981) p. 1241), or "One that looks on or beholds; esp: one witnessing an exhibition (as a sports event)." (Webster's Third Internat. Dict. (1986) p. 2188.) (5c) Given such definitions, "spectator" may apply to the purposeful observer of a cockfight as well as the mere passerby. Thus, on its face the relevant portion of section 597b is not sufficiently certain for due process purposes.

B.
Our examination of section 597b's legislative history discloses nothing regarding how the relevant portion of section 597b should be construed. The relevant language first appeared when the Legislature enacted chapter 292, Statutes of 1872, amending "An Act for the more effectual prevention of cruelty to animals" which had been adopted in 1868. Section 6 of the 1868 act was amended to provide in pertinent part: "Any person who shall cause any animals, bull, bear, dog, cock, or other creature, to fight, worry, or injure each other, or any person who shall permit the same to be done on premises under his charge or control, and any person who shall aid, abet, or be present at such fighting and worrying of such animals as a spectator for an admission fee, shall on conviction be deemed guilty of a misdemeanor; provided, that this shall not apply to officers of said society, peace or police officers, or to witnesses authorized by the Board of Trustees of said society to be present at such fight for the purpose of giving evidence before the Police Judge, Magistrate, or the Grand Jury of the county in which the offense is committed." (Stats. 1872, ch. 292, § 2, p. 394.)
However, the amending act applied only to the City and County of San Francisco. (Stats. 1872, ch. 292, § 3, p. 394.) There is nothing in the state archives to explain this amendment.
*1071 In 1874, the Legislature repealed the above described acts (Stats. 1874, ch. 340, § 18, pp. 502-503) and enacted a new act for the more effectual prevention of cruelty to animals. The new act, which was to be applied statewide, provided in relevant part: "Any person who shall cause any bull, bear, cock, dog, or other animal to fight for his amusement or for gain, worry or injure each other; or any person who shall permit the same to be done on any premises under his charge or control; and any person who shall aid, abet, or be present at such fighting and worrying of such animal, as a spectator, shall, upon conviction, be deemed guilty of a misdemeanor." (Stats. 1874, ch. 340, § 88, pp. 500-501). As can be seen, the language regarding an admission fee and exemption for those gathering evidence to prosecute the criminal conduct was omitted in the 1874 act.
Once again there is no explanation for the modification. The People nevertheless argue the deletion of the admission fee requirement reflected the Legislature's desire to proscribe the conduct of those spectators who were present to gamble as well as those who simply paid an admission fee. According to the People, such gamblers were as essential to perpetrating the "evil of cockfighting" as those who paid an admission fee. Absent some legislative history, we have nothing but speculation to support such an inference.
As to the exemption language, the People argue the Legislature considered the language unnecessary and thus deleted it. Again, however, while this may appear logical, we can find no basis for making such an assumption in the absence of some legislative history to support it.
The relevant language was incorporated in the Penal Code as part of the new section 597b in 1901. (Stats. 1901, ch. 158, § 156, p. 470.) Subsequent amendments of section 597b have not involved or affected the language in question here, except that a special section relating to fighting dogs was added in 1975. The prohibition against fighting dogs for amusement or gain was then set forth in section 597.5. (Stats. 1975, ch. 1075, §§ 1-2, pp. 2634-2635.)

C.
Further, there are no published California cases which discuss section 597b, let alone the constitutionality of the portion of section 597b with which we are concerned. In several sister-state jurisdictions, on the other hand, there are decisions construing statutes which prohibit animal fighting. Appellate courts have found statutes unconstitutionally vague which prohibit, without any reference to the person being a spectator, mere presence at an exhibition of animal fighting. (See State v. Young (Mo. 1985) 695 *1072 S.W.2d 882; State v. Wear (1984) 15 Ohio App.3d 77 [472 N.E.2d 778]; State v. Abellano (1968) 50 Hawaii 384 [441 P.2d 333].)
By contrast, where a statute prohibited persons knowingly being present as spectators at a cockfighting, a Tennessee appellate court found the statute sufficiently specific and not unconstitutionally vague. (State v. Tabor (Tenn. 1984) 678 S.W.2d 45, 46.)
In Peck v. Dunn (Utah 1978) 574 P.2d 367, where the person was charged, under a local ordinance, as a party to or present as a spectator at such fighting, the Utah appellate court found the law constitutional. It explained a sensible application of the ordinance would require a person to be present as a spectator in the sense of one purposefully and intentionally attending and observing such a fight, as opposed to a mere passerby. (Id. at p. 370.) The Peck court did not go to any lengths to explain how it could construe the statute in such a manner. Nevertheless, as we shall explain below, such an approach is an appropriate solution in this case.

D.
Here, the superior court found the relevant portion of section 597b unconstitutionally vague based on its very strict construction of the word "spectator" and use of a hypothetical passerby whom the superior court felt could be the subject of prosecution under the section. Such a strict construction was erroneous. (American Communications Assn. v. Douds (1950) 339 U.S. 382, 412 [94 L.Ed. 925, 951, 70 S.Ct. 674].)
As discussed below, in appropriate cases, courts have resolved similar questions involving statutes which, in broad language, have prohibited arguably lawful activities by resorting to a sensible but narrow interpretation of the statutory language. Such judicial analysis of legislative language is justified as furthering the obvious legislative purpose. We believe such an analysis is appropriate here.
Section 647, the disorderly conduct or vagrancy statute, has been the subject of many void-for-vagueness challenges. Words in the section such as "loitering" and "solicits ... lewd or dissolute conduct" have drawn considerable attention. Prosecution of a suspected thief found standing in a bus depot was permitted in In re Cregler (1961) 56 Cal.2d 308 [14 Cal. Rptr. 289, 363 P.2d 305]. Yet, our state's high court permitted the prosecution only after it restricted the generality of the vagrancy statute to a narrow interpretation of the words, presumably intended by the Legislature: "As proscribed by the statute, the word `loiter' obviously connotes lingering in *1073 the designated places for the purpose of committing a crime as opportunity may be discovered." (Id. at p. 312.)
The state Supreme Court later explained in Pryor v. Municipal Court, supra, 25 Cal.3d 238, 256, such a statutory interpretation serves "not only to define the reach of the law but also to add a requirement of specific intent, a feature which has often served to avert a determination that a statute is unconstitutionally vague."
In Pryor, the "lewd or dissolute conduct" language of the same section was challenged. The court found the words were quite subjective and could include conduct not intended to be proscribed. (Id. at p. 246.) However, it found no express guidance in the legislative history and much confusion in the intermediate appellate courts. (Id. at pp. 247-253.)
Although the Pryor court found the section did not meet constitutional standards of specificity, the matter did not end on that note. The court observed its judicial obligation to provide a construction of the words which gives "specific content" to the terms which otherwise would be vague. (Id. at p. 253.) Of course, this could only be done when the construction was fair and reasonable. (Ibid.) The court then construed the section to prohibit solicitation or commission of sexually oriented conduct in public for certain purposes and when the actor knows or should know of the presence of persons who may be offended by the conduct. (Pryor, supra, 25 Cal.3d at p. 256.)
Real parties in interest urge that a spectator should not be found criminally responsible despite a specific intent requirement. They try to analogize a mere witness to a crime, i.e. murder, to a spectator at a cockfight. However, a witness to a murder is not similarly situated to a spectator at a cockfight. In section 597b, the Legislature has acknowledged the crime of cock, or other animal, fighting is euphemistically a "sport" to some. Knowingly present spectators who purposefully watch cockfighting encourage the "sport." By contrast, a witness to a murder or other crime does not, under ordinary circumstances, encourage the crime.
Accordingly, we read into the relevant language of section 597b a specific intent requirement and construe it to require knowing presence as a spectator for the purpose of watching the animal fighting. We distinguish the noncriminal act of merely catching a glimpse of animal fighting in progress from the prohibited status of being knowingly present for the purpose of watching the animal fighting as it progresses. Such an interpretation is consistent with, and implicit in, the Legislature's intent to prevent cruelty to animals. Without the presence of spectators who purposefully watch the *1074 animal fighting, much of the "sport" in animal fighting would be eliminated.
We take note of recently enacted section 597.5 relating to fighting dogs. The Legislature prohibited, among other things, spectator conduct in this fashion: "... knowingly present at that exhibition ... with the intent to be present at that exhibition...." These specific-intent words are equivalent to ours of "purposeful presence" as a spectator. We conclude while the draftsmanship was more precise in section 597.5 than in the more generalized section 597b, the Legislature merely overlooked making a similar revision in the latter section. (See People v. Calban (1976) 65 Cal. App.3d 578 [135 Cal. Rptr. 441].)
Accordingly, we hold the relevant portion of section 597b refers to presence as a spectator for the purpose of watching the animal fighting and is constitutional as construed. The petition for a peremptory writ is granted. Respondent court is directed to vacate its order of September 16, 1987, granting the real parties' petition for writ of mandate.
Ballantyne, J., and Stone (W.A.), J., concurred.
The petition of real parties in interest for review by the Supreme Court was denied September 15, 1988. Mosk, J., was of the opinion that the petition should be granted.
NOTES
[1]  All statutory references are to the Penal Code unless otherwise indicated.
[2]  Section 597b provides: "Any person who, for amusement or gain, causes any bull, bear, cock, or other animal, not including any dog, to fight with like kind of animal or creature, or causes any such animal, including any dog, to fight with a different kind of animal or creature, or with any human being; or who, for amusement or gain, worries or injures any such bull, bear, cock, dog or other animal, or causes any such bull, bear, cock, or other animal, not including any dog, to worry or injure each other; and any person who permits the same to be done on any premises under his charge or control; and any person who aids, abets, or is present at such fighting or worrying of such animal or creature, as a spectator, is guilty of a misdemeanor."
[3]  Section 1238, subdivision (1), as described in Rehman is now section 1238, subdivision (a)(1) which provides: "(a) An appeal may be taken by the people from any of the following:

"(1) An order setting aside the indictment, information, or complaint...."
[4]  Interestingly, as in the present case, the trial court had found the section defining the charge, section 12312 (possession of materials with intent to make explosive or destructive devices) unconstitutionally vague. (Id. at p. 413.)
